What is static initializer block? What is its use?

Correct Answer: A static initializer block is a block of code that declares with the static keyword It normally contains the block of code that must execute at the time of class loading The static initializer block will execute only once at the time of loading the class only

Discussion & Comments

No comments yet. Be the first to comment!
Join Discussion