The most generous access modifier is public. : public « Modifiers « SCJP






A public class, variable, or method may be used in any Java program. 

Any public method may be overridden by any subclass. 

public class MainClass{
    public static void main(String[] argv){
       MyClass myClass = new MyClass();
       System.out.println(myClass.i);
    }
}
class MyClass{
  public int i=0;
}








3.4.public
3.4.1.The most generous access modifier is public.
3.4.2.If a member of its superclass is declared public, the subclass inherits that member