Distinguish between constructor and method abstract class and interface
Answers
Answered by
1
Answer:
Abstract class and interface both are used to achieve abstraction where we can declare the abstract methods. 3) Abstract class can have final, non-final, static and non-static variables. ... Interface has only static and final variables
Answered by
3
Answer:
The difference between class and interface is:
Abstract class
- Abstract class does not support inheritance.
- An abstract class would contain constructor.
- An abstract class is declared using the "Abstract" keyword.
- It can be used with all access modifiers.
Abstract Interface
- The interface supports multiple inheritances.
- The interface does not contain a constructor.
- The interface is declared using the "interface" keyword.
- It can be used with only public access modifier.
Similar questions
English,
18 days ago
Math,
18 days ago
CBSE BOARD XII,
18 days ago
English,
1 month ago
Math,
1 month ago
Social Sciences,
9 months ago
Science,
9 months ago
Sociology,
9 months ago