Open-Closed Principle – ‘O’ in SOLID Principles
The open-closed principle (OCP) states that a module should be open to extension but closed for modification. It is one of SOLID principles.
CARVIEW |
The open-closed principle (OCP) states that a module should be open to extension but closed for modification. It is one of SOLID principles.
The single responsibility principle (SRP) states that a software component (in general, a class) must have one and only one responsibility.
Learn about the FIRST principles for unit testing that can help make our unit tests shine and ensure they pay off more than they cost.
Learn SOLID principles in Java with examples. Single Responsibility Principle, Open Closed Principle, Liskov’s Substitution Principle, Interface Segregation Principle, Dependency Inversion Principle.
HowToDoInJava provides tutorials and how-to guides on Java and related technologies.
It also shares the best practices, algorithms & solutions and frequently asked interview questions.