what are the diffrences between interface and abstract
class?
Answer Posted / cool
=>Interface :
1. All the methods in the interface are abstract.
2. We can achieve multiple inheritance through interface.
3. All the methods in the interface should be without
Access modifier. Implicitly public.
Abstract class:
1. Abstract class may contain abstract method and non-
abstract method.
2. We can achieve only single inheritance and multi-level
inheritance.
3. Abstract methods have Access modifiers.
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
According to java operator precedence, which operator is considered to be with highest precedence?
What is a double vs float?
How long will it take to learn java?
What is identifier give example?
Explain different types of wrapper classes in java?
why an outer class cannot be declared as private?
What is the difference between hashmap and hashtable in java?
What is string builder?
Why are constructors used?
What is autoboxing in java?
Which class is the superclass of all classes?
What is java reflection api?
What is finalize() function in java?
What is the final keyword?
Which collection is thread safe in java?