Static block in Java
A static block in a program is a block which is associated with a static keyword. The static block executes when the classloader loads the class. A static block is invoked before the main() method in java. Syntax: ………static { …….statements}……. Let us go through a static block example. Static block in Java with Example … Read more