官术网_书友最值得收藏!

Encapsulation

Encapsulation basically means the binding of attributes and behaviors. The idea is to keep the properties and behavior of an object in one place, so that it is easy to maintain and extend. Encapsulation also provides a mechanism to hide unnecessary details from the user. In Java, we can provide access specifiers to methods and attributes to manage what is visible to a user of the class, and what is hidden.

Encapsulation is one of the fundamental principles of object-oriented languages. It helps in the decoupling of different modules. Decoupled modules can be developed and maintained more or less independently. The technique through which decoupled modules/classes/code are changed internally without affecting their external exposed behavior is called code refactoring.

主站蜘蛛池模板: 滦南县| 安国市| 吴桥县| 托克逊县| 盐山县| 刚察县| 南漳县| 伊春市| 年辖:市辖区| 那坡县| 巩留县| 邛崃市| 北川| 孝义市| 隆回县| 沙湾县| 盘锦市| 凤山市| 普定县| 康保县| 普兰店市| 婺源县| 保康县| 宁明县| 兰考县| 通州市| 密云县| 仲巴县| 东源县| 清丰县| 山阴县| 香港| 滦平县| 福安市| 阿鲁科尔沁旗| 杭锦后旗| 浑源县| 漳平市| 乌兰县| 兰考县| 曲松县|