Open Closed Principle in Java | SOLID Principles

The Open-Closed Principle (OCP) is a fundamental object-oriented design principle. In this article, I’ll explain what the Open-Closed Principle is and how to implement it effectively in your code or module.

The open closed principle is one of the five design principles of object-oriented design. These set of five principles are known as SOLID principles.

In my previous post, i have already explained single responsibility principle. In subsequent tutorials, I’ll cover rest of the principles.