Encapsulation, what is really the point?
Im new to java programming.
I've read what Encapsulation is but i'm still confused as to the point. Maybe i'm misunderstanding in some fashion.
Lets say I have 2 classes.
classone has the private variables and the method to retrieve those variables.
classtwo is the main class that makes use of those variables.
Why does Encapsulation exist? The only way for me to actually modify public variables in classone from classtwo is to actually use classone.varname right? Why is the protection needed?