Quick Answer
Four OOP pillars in Java: Encapsulation - wrap data and methods in a class, use private fields with public getters/setters. Inheritance - subclass extends superclass to reuse and add behavior (extends keyword). Polymorphism - object behaves differently based on actual type (method overriding). Abstraction - hide complex implementation behind simple interfaces (abstract classes, interfaces).
Answer
Encapsulation: Hides internal state and exposes only required methods. Inheritance: Allows classes to reuse fields and methods. Polymorphism: Treat objects as instances of parent type. Abstraction: Hides implementation using abstract classes or interfaces.
S
SugharaIQ Editorial Team
Verified Answer
This answer has been peer-reviewed by industry experts holding senior engineering roles to ensure technical accuracy and relevance for modern interview standards.