Java OOP Concepts

There are four core concept in OOp: encapsulation , inheritance , polymorphism and abstraction.


  • The basic idea of encapsulation is to ensure that implementation detail are not visible to users.
  • The variable of one class will be hidden from the other classes , accessible only through the method of current class.This is called data hiding.


  • Inheritance is the process that enables one class to accquire the properties (method & variable ) of other.
  • With Inheritance , the information is placed in more manageable hierarchical order.


Polymorphism which refers to the idea of having many forms occurs when there is hierarchy of classes related to each other through inheritance.


Abstraction provides the outside world with only essential information , in a process of representing essential features without including implementation details.