0% found this document useful (0 votes)
4 views10 pages

Abstract Class vs Interface Explained

The document compares abstract classes and interfaces in programming. It highlights key differences such as method types, inheritance capabilities, and variable permissions. Abstract classes can have both abstract and concrete methods, while interfaces can only have abstract methods and support multiple inheritance.

Uploaded by

Rainet Max
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views10 pages

Abstract Class vs Interface Explained

The document compares abstract classes and interfaces in programming. It highlights key differences such as method types, inheritance capabilities, and variable permissions. Abstract classes can have both abstract and concrete methods, while interfaces can only have abstract methods and support multiple inheritance.

Uploaded by

Rainet Max
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Abstract Class Interface

Abstract class can have both


Interface can have only
an abstract as well as
abstract methods.
concrete methods.

Multiple Inheritance is not Interface supports


supported. Multiple Inheritance.

final, non-final, static and


Only static and final
non-static variables
variables are permitted.
supported.

Interface cannot
Abstract class can implement implement an interface,
an interface. it can extend an
interface.

Abstract class declared using Interface is declared


abstract keyword. using interface keyword.

Abstract class can inherit


another class using extends Interface can inherit only
keyword and implement an an interface.
interface.

Abstract class can be Interface can only be


inherited using extends implemented using
keyword. implements keyword.

Abstract class can have any


Interface can only have
type of members like private,
public members.
public.

You might also like