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
How does regex work?
What is the difference between reader/writer and inputstream/output stream?
How do you escape a string?
What are the two types of java?
write a program that list all permutations of ABCDEF in which A appears before B?
Explain notify() method of object class ?
What is thread safe java?
Can we overload destructor in java?
When is finally block not called?
Is hashset ordered java?
What does bitwise or mean?
Can we extend singleton class?
Which collection is sorted in java?
What is functional interface in java?
According to java operator precedence, which operator is considered to be with highest precedence?