The static block is executed even without main method in the application program (in JAVA 6).
You cannot answer this question unless you specify the Java version. This question is completely wrong as if you run a static block in a machine which is running Java 7.
p++ executes faster than p + 1 because
Compilation error will occur until you change the code to the following : public static void select(){ int a = 2; switch(a){ case 1: { System.out.println("case 1"); } case 2: { System.out.println("case 2"); } default: { System.out.println("default"); } } }