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

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.

主站蜘蛛池模板: 彭水| 万荣县| 屏山县| 吴忠市| 梓潼县| 兰西县| 山阳县| 余江县| 汉沽区| 京山县| 秭归县| 家居| 建始县| 宝鸡市| 盘山县| 龙州县| 大方县| 邮箱| 鹰潭市| 和平县| 玉树县| 密山市| 昌邑市| 荆门市| 衡东县| 化德县| 乌恰县| 天津市| 自治县| 石渠县| 恩施市| 饶河县| 吉林省| 昌黎县| 西和县| 永善县| 通榆县| 宝应县| 保定市| 水城县| 秦安县|