Pandiyan Mani
Aug 10, 2021

--

Abstract class

Before looking in to abstract class lets look in to abstraction.Abstarction mean hiding the implemenatation details and showing only the functionality to the user.The abstraction can be achieved in two ways

interface

Its a bluprint of class.

It contain only abstract method.

Its used by implements in the class.

We can implement multiple interface in a class.By this way mutiple inheritance concept is acheived.

abstract class

It contain abstract method and normal method.

It comes with a keyword abstract before the class name.

Abstract class cannot be instantiated, it can only be extended.

Abstarct class can have static method and constructor.

Abstract classes can also have final methods (methods that cannot be overridden)

--

--