Java OOPS (Object Oriented programming System) Tutorial for Selenium Testers, Java Inheritance, Java Polymorphism, Java Abstraction and Java Encapsulation.
Polymorphism - Existence of Object behavior in many forms

We have 2 types of Polymorphism,

1. Compile Time Polymorphism / Method OverLoading
2. Run Time Polymorphism/Method Overriding

Compile Time Polymorphism / Method OverLoading

If two or more methods with same name in the same class, but differ in the following ways,
i. Number of Arguments
ii. Type of Arguments

2. Run Time Polymorphism/Method Overriding
if two or more methods with same name that available parent class and child class

Abstraction
It is a process of hiding the implementation details and showing only functionality to the user

Encapsulation
It is a process of wrapping code and data into a single unit

Encapsulation is the technique making the fields in a class private and providing access via public methods

It provides control over the data and by providing getter and setter methods we can make a class read only or write only