封装

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

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