Java is Object Oriented Programming language it supports Object Oriented Programming features those are Inheritance, Polymorphism, Abstraction , Encapsulation. we will discuss in detail.
Inheritance is not but one object can acquires properties from other object, the basic advantage of this oops feature is code re usability and useful to implement run time polymorphism, we will see what is polymorphism.
“The ability to take more than one form” i.e to implement different functionality with same name in class or derived/sub class.
There are two types of polymorphism, one is compile time polymorphism which nothing but overloading and second one is run time polymorphism which is Overriding. Please have a look in the below links we get best information about overloading and Overriding
“Representing effective details with out including the back ground details ” , i.e we will hide the complexity of functionality how the implemented has done and will provide easy way to use that functionality , better real time example is driving a car, we don’t know how car steering is linked to tyres but we know how to operate the steering. Abstraction is very core feature of object oriented programming language like Java. by using interfaces and abstract classes we can achieve Abstraction in Java.
This feature says how to wrap the data and code in single unit and protect those from out of that unit. In java can achieve by using access modifiers, i.e declare some member as private in class , so out side of class we can’t able to access those members.