Papatonk:
In short, the main reason we use private is we don`t want another class to change the variable accidentally.
Another class just can access and change public variable.
Replace "another class" by "anybody".
Papatonk:
In short, the main reason we use private is we don`t want another class to change the variable accidentally.
Another class just can access and change public variable.
Replace "another class" by "anybody".