1. Encapsulation: Bundling data and methods into a single unit (class) and hiding the internal details from the outside world to ensure secure and organized code.
  2. Abstraction: Simplifying complex systems by focusing on essential properties and behaviors while hiding irrelevant details, promoting clarity and efficiency.
  3. Inheritance: Allowing classes (subclasses) to inherit attributes and methods from other classes (superclasses), facilitating code reuse, and establishing hierarchical relationships.
  4. Polymorphism: Enabling objects to be treated as instances of their superclass, while methods can be defined in multiple forms, supporting flexibility and dynamic behavior in software design.

Encapsulation

Abstraction

Inheritance

Polymorphism in Java