What is the difference between Abstract Class and Interface
Answer Posted / ravi
1.A programmer creates abstract class when there are some
common features shared by all the objects.
A programmer writes an interface when all the features
should be implemented differently for different objects.
2.When an abstract class is written the programmer should
provide sub classes to it.
A programmer writes an interface when he wants to leave
implemntation classes to third party vendors.
| Is This Answer Correct ? | 8 Yes | 0 No |
Post New Answer View All Answers
What does file separator do in java?
What are the advantages of exception handling?
Why volatile is used in java?
What are the 6 boolean operators?
How java enabled high performance?
How many threads does a core java have?
What are abstract methods in java?
how to create multithreaded program? Explain different ways of using thread? When a thread is created and started, what is its initial state? Or extending thread class or implementing runnable interface. Which is better? : Java thread
What is file in java?
Explain the use of javap tool.
What is a null class?
What is the purpose of final keyword and when to use it?
Can I declare a class as private?
Difference between current previous versions of Java?
Can we overload the main() method?