OOP’s in Java Programming Language

Posted on

OOP’s treats data as critical element and dose not allow it to move freely around the system. It ties data more closely to a set of code. Data can be accessed only from this code.

OOP’s principles:

  1. Encapsulation.
  2. Inheritance.
  3. Polymorphism.

Encapsulation is the process of binding data and code into a single unit is referred as Encapsulation. It provides us the striking feature of data handling. The data is bound more closely to a set of code. They are in accessible to the external world.

The data is commonly referred as instance variables and the code is commonly referred as instance variables and the code is commonly referred as member methods. You can create the entire unit with the help of a class. Collectively the instance variables and member method are referred as the members of the class.

Inheritance: OOP’s strongly supports the concept of reusability. It would always be better if we could reuse some thing, which is already existing without trying to create the same thing all over again. The mechanism of acquiring the properties of one class into another is referred as Inheritance.

Polymorphism: The ability to take more than one form is referred as Polymorphism.

Leave a Reply

Your email address will not be published. Required fields are marked *