I do not properly understand static block. Could anybody give me some hints. What is it?
Joined: Oct 13, 2005
If I understand your question correctly, what you have is called a static initialiser. There is discussion on the Ranch in several places, this, and this, which is maybe less helpful, being two recent examples I found with a search.
Joined: Nov 08, 2006
static block will be executed when the class gets loaded...
Joined: Dec 09, 2003
Yup, the code in a static initializer block is executed by the virtual machine when the class is loaded.