Encapsulation
It is recommended to set access modifier limited scope to maintain code well.
The reason why we use access modifier is 1. to protect data from outside and 2. hide internal data that is unnecessary in outside. Rather than direct access to member variable, it is available to access to member variable via method.
Last updated