Welcome to the Ranch
1) Static
block This block of code is executed automatically by the JVM when the class is loaded
2)
public static void main (String[] args) This method is invoked automatically by the JVM when you run your application. However this happens
after the static block code (if any) exists
As you can see both the block and method is invoked by the JVM
However, no code is invoking
public static void staticMethod() and thus you do not see any output