What is the difference between an Interface and abstract class?
What is the difference between an Interface and abstract class?
Share
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Aviance School is one of the largest web solutions platform in India for developers to learn and share their programming knowledge and build their careers.
Interface :
{i}Interface can have only abstract methods.
{ii}Support multiple inheritance.
{iii}The “interface” keyword is used to declare interface.
{iv}Variables declared in a Java interface is by default final.
Abstract Class:
{i}Abstract class can have abstract and non-abstract methods.
{ii}Doesn’t support multiple inheritance.
{iii}The “abstract” keyword is used to declare abstract class.
{iv}An abstract class may contain non-final variables.