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

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.

主站蜘蛛池模板: 绿春县| 离岛区| 京山县| 临沂市| 望奎县| 胶南市| 蒲城县| 台东县| 和林格尔县| 丰原市| 景泰县| 五莲县| 镇安县| 融水| 洛宁县| 南江县| 桃江县| 鹰潭市| 南靖县| 阿拉善左旗| 延吉市| 石城县| 来宾市| 错那县| 乐都县| 泰顺县| 吉安市| 拜城县| 桃园市| 宁陵县| 清河县| 郓城县| 顺昌县| 前郭尔| 赣州市| 博客| 北宁市| 峨山| 哈巴河县| 玉屏| 开鲁县|