That block is called a static initializer. You will find details in the Java™ Language Specification, but it is by no means easy to read.
Please ask again if you don't understand it.
Abubacker Siddik
Ranch Hand
Joined: Aug 12, 2009
Posts: 90
posted
0
My doubt is to know how a static block assigns a variable even before the variable is declared. That's what i intend to ask. Because i thought this would give compile time error. To my wonder it was successfully compiled. Please show me some suggestions.