ProAnswers.org

What is static block?

Is used to initialize the static data member. It is excuted before main method at the time of classloading

Static block which exactly executed exactly once when the class is first loaded into JVM. Before going to the main method the static block will execute.