update: wrong, just wrong. Why do we use private methods and fields? They can still be changed outside of the object
update:
My code is wrong, a mistake from copying and replacing what I ran that lead me to ask the question. Here is the corrected code and output.
Why do we use private methods and fields? They can still be changed outside of the object
I am trying to understand how and why to use getters and setters, and private fields in general. I have read lots of explanations and none of them make sense to me. My understanding is that we do this to protect the field from manipulation. However, if the field holds an object of any type, it is still mutable and therefore manipulatable.