It is a programming approach that organizes code into object and classes and make it more structured and easy to use. Java Follows DRY (Don’t Repeat Yourself)


Alt text
Alt text

Four main pillars of object oriented programming

Abstraction


Only essential details are displayed to the user In hava it is achieved via Interfaces and Abstract classes


Encapsulation


Wrapping up of the data into a single unit data-hiding Variables are private and the methods are public


Inheritance



Polymorphism


Ability to differentiate between entities with same name efficiently


Types of Polymorphism

is-a

kind-of

has-a/has-many

Pros & Cons

Pros

Cons


Classes
Quiz
Videos
References
Books