What is the difference between Abstract Class and Interface
Answer Posted / tarun jangra
1. An abstract class is a specialization whereas Interface
is a generalization. That means an abstract class is created
when only few class wants to share some methods,when you
have to create some methods to be shared by all the classes
then interface is used.
2. An abstract class can have non-abstract methods (means
methods with implementation) while all the methods in an
Interface are by default abstract.
| Is This Answer Correct ? | 11 Yes | 0 No |
Post New Answer View All Answers
What is a prefix function.write down a code to compute prefix function.
What is the function of http?
What is stack example?
What is identifier with example?
What is the difference between static class and normal class?
What is anti pattern in cyber security?
How many bytes is a char in java?
What is sortedmap interface?
In which order the iterator iterates over collection?
What is the difference between reader/writer and inputstream/output stream?
What is the purpose of assert keyword used in jdk1.4.x?
What is null object in java?
Explain the difference between intermediate and terminal operations in java8?
What is time complexity algorithm?
How many days will it take to learn java?