Understanding Open/Closed Principle (OCP) from the SOLID OO principles with a Java example

Q. Is there anything wrong with the following class design? If yes, can the design be improved?

JUnit test class.

A. It’s not a good idea to try to anticipate changes in requirements ahead of time, but you…


300+ Java & Big Data Interview FAQs

16+ Java Key Areas Interview Q&As

800+ Java Interview Q&As

300+ Java & Big Data Tutorials

Top