Question: what is the difference between static block and static method in java?
Answer: static blocks are executed before the main() method by JavaClass loader. A class can have multiple Static blocks, which will execute in the same sequence in which they have been written into the program. static {} , it is executed every time, when the class loads.