Static Blocks In Java. Mocking static blocks in java. The static keyword refers to a class rather than a specific class instance.

Java 8 object oriented programming programming. The static block is a block of statement inside a java class that will be executed when a class is first loaded into the jvm. The code inside the static block body executes once when the class is loaded into the memory.