In real time project when will we use Abstract class. and
what are the difference between abstract and interface.
Answer Posted / naveen verma
Abstract Class:- its should have declared as abstract and must contain atleast one abstract method. an abstract class can be extended from either an abstract class or the class which is extending the abstract class should implement all methods of abstract method.
Interface:- In interface the methods are only declared not define the class which implementing the interface can define the method body as per its need. its not mendatory to define every method of the interface.
In really time application we extend abstract class only we when we need to modify the class. where as interface can be used to implements its method.
Is This Answer Correct ? | 1 Yes | 3 No |
Post New Answer View All Answers
Define the remote object implementation?
How database connectivity in XML is achieved?
Java is fully object oriented languages or not?
How messaging services are done, before release of JMS?
Is the ternary operator written x : y ? Z or x ? Y : z ?
Can you give me a simple example of using the requiredif validator rule?
What is re-entrant. Is session beans reentrant. Is entity beans reentrant?
To what value is a variable of the string type automatically initialized?
In inglish: How to convert jar to exe files? Em português: Como converter arquivos .jar para .exe?
Difference between DurableSubscription and non- DurableSubscription?
why static class in java
Have you used threads in Servelet?
Describe responsibilities of Activator?
Should synchronization primitives be used on bean methods?
Can I use javascript to submit a form?