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
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment