Computer Science, asked by GreenCloud, 1 month ago

Distinguish between constructor and method abstract class and interface​

Answers

Answered by ItzBangtansBird
1

Answer:

{\huge{\textbf{\textsf{{\color{navy}{♡ An}}{\purple{sw}}{\pink{er ♡}}}}}}

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