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…

Members Only Content

Log In Register Home

800+ Java & Big Data Interview Q&As