+ 1

Getter and Setter

How getter and setter protect your data ???? I don't understand😔😓

29th Mar 2017, 10:44 PM
ahmed
1 ответ
+ 3
you have to declare your fields as private so no other class can see it fields. If a other class want to use them it has to use the getter or setter
29th Mar 2017, 11:09 PM
T0nd3