private

The private keyword is a modifier that can be used in the declaration of methods or variables. (Note that the private keyword cannot be used in the declaration of local variables.) Using the private modifier in the declaration for either of these types hides the methods and variables so they cannot be directly referenced outside of the class they're declared in. One exception to this rule is that private methods or variables declared within a class can also be used by inner classes.