|Major Pillars||Minor Pillars|
Binding data and putting it together is called encapsulation.
The process of implementing abstraction is called encapsulation.
Class is the basic unit of encapsulation.
Abstraction always describes outer behavior of object and encapsulation describes inner behavior of object.
Process of getting essential things from an object is called abstraction.
Breaking codes in two modules logically or physically is called modularity.
The level or ranking order of abstraction is called hierarchy.
There are 4 types of hierarchy
- Composition: has-a relationship
- Inheritance: is-a relationship
- Dependency: use-a relationship
- Instantiation: creates-a relationship
A journey from generalization to specialization is called inheritance.Its main purpose is to achieve re-usability.
3 minor pillars of OOPS
one interface having many behaviors is called polymorphism.
e.g. board can be used for writing or screen projection.
USB ports can be used for a webcam or headphone or mouse.
There are two types of polymorphism
- compile time polymorphism
- runtime polymorphism
Compile Time Polymorphism
when the function gets called at compile time is called as compile time polymorphism also called as static binding / static polymorphism / early binding / weak typing / false polymorphism.
Run Time Polymorphism
when a call to the function gets resolved at runtime is called runtime polymorphism. It is also called dynamic binding / dynamic polymorphism / strong typing / true polymorphism.
- Compile time polymorphism can be achieved by operator overloading or function overloading.
- Runtime polymorphism can be achieved by function overriding.
It refers to saving data (usually to a disk) for future access.
Concurrency refers to the potentially parallel execution of parts of a computation. In a concurrent computation, the components of a program may be executed sequentially, or they may be executed in parallel.
In Java concurrency is achieved by implementing Multithreading.