Java · Easy
What are the four pillars of OOP (Encapsulation, Inheritance, Polymorphism, Abstraction)? Explain each with real-world examples.
JavaOOP
Answer preview
Object-Oriented Programming in Java is built on four pillars — encapsulation, inheritance, polymorphism, and abstraction — that together enable modular, reusable, and maintainable code.…