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.