Do you know how can I make an object changeable only inside a special class?
In this example I want the object PrivateObject to be only changable (incrementable) inside the
In Java, you would create a group of "friends" by putting multiple classes in the same package. Then, use default scope (no access specifier) on the classes, methods and fields you want to restrict access to.