A class's data and methods may be default, as well as the class itself.
class MainClass{
static void main(String[] argv){
System.out.println();
}
}
class MyClass{
int i=0;
}
A class's default features are accessible to any class in the same package as its class.
A default method may be overridden by any subclass that is in the same package.
|