Get contacted by recruiters directly with our newest chat feature!
Register now or log in to join your professional community.
The main reason is encapsulation
Encapsulation in Java
because the function of setter uses to set a value for private variable , and function getter to get the value
Cancel Report Answer