Java Codes
Static Block
class StaticBlock {
public static void main(String[] args) {
System.out.println("Main method is executed.");
}
static {
System.out.println("Static block is executed before main method.");
}
}
No comments:
Post a Comment
‹
›
Home
View web version
No comments:
Post a Comment