Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
可能的重复: 开放/封闭原则
我可以理解打开/关闭原则表明
"You should be able to extend the class behaviour, without modifying it"
这里的开和关是什么意思?
对扩展开放。
对更新/更改/修改关闭。
http://en.wikipedia.org/wiki/Open/closed_principle
维基百科文章中很清楚。