封装

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

原文地址:https://www.cnblogs.com/hawthornn/p/5823530.html