Search This Blog

Sunday, July 20, 2025

Open-Closed principle

 You are writing code for an application following the Open-Closed principle. Which of the following actions will you choose not to violate the Open-Closed principle?

a) You extend an existing class

b) You add a method to an existing class rather than extending it

c) You extend an existing class and also override a method of the superclass 


Created by Nancy N.

@11:41 20-07-2025

Follow this blog for more interesting information

Subscribe to the YouTube channel @CodeWithNancy

No comments:

Post a Comment