The private
modifier indicates that the member is only accessible from within the same class (and nested classes, if any). Without the modifier, it would be accessible from other classes in the same package (using obj.head
if obj
is an instance of the class).
- Declaring Member Variables (search for Access Modifiers)
- JLS §8.2, Class Members
solved Java – What is a meaning of Combination of access modifier and class name