Searching for "initializer"

Q:

What is static initializer block? What is its use?

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.

Report Error

View answer Workspace Report Error Discuss

Subject: Java