1) Interface contains only method declarations whereas abstract class contains method declarations that are abstract methods plus the non abstract methods that have definitions also
2) By default methods in an interface are abstract whereas abstract class contains non abstract methods also.
3) An abstract class can extend only one class where an interface can extend multiple interfaces.
4) Variables declared in interface are by default public static final whereas abstract class variable not necessarily public static final
2) By default methods in an interface are abstract whereas abstract class contains non abstract methods also.
3) An abstract class can extend only one class where an interface can extend multiple interfaces.
4) Variables declared in interface are by default public static final whereas abstract class variable not necessarily public static final
No comments:
Post a Comment