what is difference between Abstract and Interface ?

please explain your answer ?


3 Answers
1-3 of  3
3 Answers
  • 1) Abstract class can have abstract and non-abstract methods. Interface can have only abstract methods.
    2) Abstract class doesn't support multiple inheritance. Interface supports multiple inheritance.
    3) Abstract class can have final, non-final, static and non-static variables. Interface has only static and final variables.
    4) Abstract class can have static methods, main method and constructor. Interface can't have static methods, main method or constructor.

  • Main difference is methods of a Java interface are implicitly abstract and cannot have implementations. A Java abstract class can have instance methods that implements a default behavior.

Object Oriented Programming

Didn't get the answer.
Contact people of Talent-Object Oriented Programming directly by clicking here