I am trying to get my head around the open closed principle:
Modules should be open for extension and closed for modification
In terms of java is the extension specifically inheritance or does it include inheritance as well as the addition of new methods or properties?
I am also struggling to get my head around closed for modification, it seems to be implying to me that once a method is written that it cannot change.
This seems at odds with real work where I will pick up tasks from jira which will require me to change at least one method in the codebase.
I have read lots of posts and articles in the last 24 hours and I am still not entirely sure what this principle is trying to get across.
Any simple explanation would be very helpful.