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

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.

主站蜘蛛池模板: 南宫市| 大理市| 舟曲县| 靖远县| 霸州市| 镇安县| 开阳县| 江阴市| 太谷县| 剑阁县| 通化市| 青海省| 磐石市| 莲花县| 静海县| 北海市| 休宁县| 都兰县| 宿迁市| 石城县| 定安县| 星座| 陆良县| 康保县| 营口市| 资兴市| 温泉县| 安阳县| 白玉县| 文山县| 万山特区| 五寨县| 焦作市| 廉江市| 崇仁县| 原阳县| 乌兰浩特市| 淮滨县| 东山县| 柳河县| 大宁县|