Encapsulation | OOP Pillar | Java Encapsulation | Accessors | Mutators | Getter | Setter

preview_player
Показать описание
In this lecture, we will cover the following topics:
1- What is Encapsulation?
It is the mechanism that binds together code and the data it manipulates
2- how to implement it?
-By declaring all the variables in the class as private
-By writing public methods in the class to set and get the values of variables
Рекомендации по теме