top of page

Difference between abstract class and interface

Abstract Class


  • can be extended using keyword "extends"

  • abstract keyword

  • doesn't support multiple inheritance

  • can have final, non-final, static and non-static variables

  • can extend another Java class and implement multiple Java interfaces

  • can have class members like private, protected, etc.




Interface


  • can be implemented using keyword "implements"

  • interface keyword

  • supports multiple inheritance

  • has only static and final variables

  • can extend another Java interface only

  • are public by default



Comments


Single post: Blog_Single_Post_Widget
bottom of page