What Is Abstraction | Abstraction In Java With Example | PLM Developer

Abstraction is the process of showing what is essential to the user and hiding all non-essential details. In java, we can implement the abstraction using Abstract classes and Interfaces.

In java, the abstract keyword used to declare abstract classes & methods. 

Abstract Class:
  1. An abstract class declared with keyword abstract.
  2. An abstract class can have both abstract and non-abstract methods.
  3. Abstract classes restricted to create objects. So, we cannot instantiate.
  4. If a class has one or more abstract methods must be declared as an abstract class.
  5. Any class that extends the abstract class should implement all the methods.
  6. An abstract class can have static & final methods and constructors.

Post a Comment