Is that static a method so we can call it directly ?
class stats1 {
static {
System.out.println("Super static");
}
}
Is that static a method so we can call it directly ?
class stats1 {
static {
System.out.println("Super static");
}
}
It is a static block
. You may not be able to call it specifically as it executes when the class is loaded.
For more details refer this - http://www.jusfortechies.com/java/core-java/static-blocks.php