Tag: get and set
-
Encapsulation : Private,final,get and set
Encapsulation: The meaning of Encapsulation, is to make sure that “sensitive” data is hidden from users. To achieve this, you must: Private: final variable: The final keyword is a non-access modifier used for classes, attributes and methods, which makes them non-changeable (impossible to inherit or override). The final keyword is useful when you want a variable to always store the…