the following variable modifierspublicanyone can access public instance variables protectedonly methods of the same package or of its subclasses can access protected instance variables privateonly methods of the same class (not methods of subclasscan access private instance variables if none of the above modifiers are usedthe instance variable is considered friendly friendly instance variables can be accessed by any class in the same package packages are discussed in more detail in section in addition to scope variable modifiersthere are also the following usage modifiersstaticthe static keyword is used to declare variable that is associated with the classnot with individual instances of that class static variables are used to store "globalinformation about class (for examplea static variable could be used to maintain the total number of gnome objects createdstatic variables exist even if no instance of their class is created finala final instance variable is one that must be assigned an initial valueand then can never be assigned new value after that if it is base typethen it is constant (like the max_height constant in the gnome classif an object variable is finalthen it will always refer to the same object (even if that object changes its internal statecode fragment the gnome class