Java Programming/Keywords/private

From Wikibooks, open books for an open world
< Java Programming | Keywords
Jump to: navigation, search

private is a Java keyword which declares a member's 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:

Personal tools
Namespaces
Variants
Actions
Navigation
Community
Toolbox
Sister projects
Print/export