Back to upper page

  • Interface object definition starts with keyword interface while abstract class start with keyword abstract class
  • Abstract class is a class which contain one or more abstract methods which has to be implemented by sub classes while Interface is a Java Object containing method declaration and doesn't contain implementation
  • Classes which implement Interfaces must provide method definition for all Interface methods.
  • By default what ever variables we declare in interface are public static final where as in abstract class they can be default and instance variables also
  • Abstract classes are useful in a situation that some general methods should be implemented and specialization behavior should be implemented by child classes. Interfaces are useful in a situation that all properties should be implemented we can use this scenario