Oops concepts are the rules which are supposed to be satisfied by a programing language in order to call that programing language as an Object Oriented Programing Language.
Encapsulation:The process of binding the data with corresponding methods
- The concept of binding the data along with its related and corresponding methods is known as Encapsulation.
- The concept of restricting the availability of the data only to its related areas and related functions it is known as binding.
- Because of binding we can restrict the availability of data to the unrelated methods
- So that unrelated functions cannot access the data
- Class is the base for encapsulation
Polymorphism:Defining multiple methods with same name known as Polymorphism.
- Static polymorphism (Compile time polymorphism ):
The concept of defining multiple methods with same name and with different parameters within the same class is known as static polymorphism.
- Dynamic polymorphism (Run time polymorphism ):
The concept of defining multiple methods with same name and with same signature in super class and sub class known as Dynamic polymorphism.
Inheritance:Getting the properties from one class object to another class object is known as Inheritance.
- Multiple inheritance:
Getting the properties from one class object to another class object level wise with different priorities.
- Multilevel inheritance:Getting the properties from one class object to another class object with same priority.
You might like:
- Format dates in Java
- Design Patterns
- String vs Stringbuffer vs Stringbuilder
- Marker Interfaces
- Var Args in java
- JVM Architecture
- Java 7 Features