封装

封装的基本原则:将实例变量标记为私有的(private),并提供公有(public)的getter和setter来控制存取动作

posted @ 2016-08-30 20:32  hawthorn  阅读(160)  评论(0)    收藏  举报