what is the difference between abstract class and
Interface?where we can use it in realtime projects?
Answer Posted / nitesh
1)We define an Interface in the Java application with a
set of abstract methods without any implementation. Which
means all the methods of an interface are by default
abstract methods and public methods.
2)Once an Interface is defined in the application then any
class can implement that interface, in such case the class
must be implemented with all the mehtods of the respective
Interface otherwise the class will become as abstract class.
3)A class can implement any no. of interfaces, in such case
the class must be implimented with all the methods of those
interfaces otherwise the class will become as abstract class
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What is methodological theory?
What is the difference between static (class) method and instance method?
What is qms certification?
Why is java called the platform independent programming language?
What is an class?
How to sort an unsorted array in java?
what do you understand by synchronization? : Java thread
Why do we need hashset in java?
How do you use wildcards?
What is linked hashset and its features?
What is a java applet? What is an interface?
What is the size of boolean variable?
What is module in project?
What does nullpointerexception mean?
What is meant by data hiding in java?