A publicclass, variable, or method may be used in any Java program.
Any public method may be overridden by any subclass.
publicclass MainClass{
publicstaticvoid main(String[] argv){
MyClass myClass = new MyClass();
System.out.println(myClass.i);
}
}
class MyClass{
publicint i=0;
}