Java Programming/Keywords/private

From Wikibooks, the open-content textbooks collection

Jump to: navigation, search

private is a Java keyword which declares a members access as private. That is, the member is only visible within the class, not from any class (including subclasses). The visibility of private members extends to nested classes.

Syntact:

private void method();

See also: