I came across the following question in the Java Roundup rules quiz and I was very surprised with the answer.
Can one object access the private variable of another object of the same class? Answer: Yes Explanation: Private means private to the class not private to the object. So two objects of the same class could access each other's private data.
Could somebody please explain this to me? I don't understand!