🏗️ SOLID Principles
Beginner
What are the SOLID principles?
Answer
SOLID is an acronym for five foundational object-oriented design principles introduced by Robert C. Martin (Uncle Bob). They are: S — Single Responsibility Principle (a class should have only one reason to change), O — Open/Closed Principle (open for extension, closed for modification), L — Liskov Substitution Principle (subtypes must be substitutable for their base types), I — Interface Segregation Principle (clients should not depend on interfaces they don't use), and D — Dependency Inversion Principle (depend on abstractions, not concretions). Together, these principles guide developers toward code that is maintainable, testable, and extensible over time.
More SOLID Principles Questions
View all →- Beginner What does the Single Responsibility Principle (SRP) mean?
- Beginner What does the Open/Closed Principle (OCP) mean?
- Beginner What does the Liskov Substitution Principle (LSP) mean?
- Beginner What does the Interface Segregation Principle (ISP) mean?
- Beginner What does the Dependency Inversion Principle (DIP) mean?