private Java Keyword

The private keyword is an access control modifier that may be applied to a class, a method or a field (a variable declared in a class).

Examples

  public class MyPublicClass
  {
     private class MyPrivateClass
     {
     }
	 
     private int i;
 
     private String myMethod()
     {
       <statements>
     }
  }
  

Remarks

Related Topics

protected Java Keyword

public Java Keyword