Java / Object, Class and Package
Difference between Static block and initializer block in Java.
The static initializer block will be called on loading of the class, and will have no access to instance variables or methods. It is often used to create static variables.
The non-static initializer block is created on object construction only, will have access to instance variables and methods. It will be called at the beginning of the constructor, after the super constructor has been called (either explicitly or implicitly) and before any other subsequent constructor code is called.
More Related questions...