In Java,
Do objects encapsulate data so that not even other instances of the same class can access the data? Only when the keyword \"private\" is used? What are \"ac
Do objects encapsulate data so that not even other instances of the same class can access the data?
Sure, if you are not using static members.
Extract from this link:
Sometimes, you want to have variables that are common to all objects. This is accomplished with the static modifier. Fields that have the static modifier in their declaration are called static fields or class variables