In my Instance Initialization Block Part 1 tutorial I presented an example of how you can save time and optimize your code by using an instance initialization block. In this tutorial I explain when the instance initialization block is called and why the timing is an important to thing to become familiar with. There are a few simple rules for the execution of an instance initialization block:
The instance initialization block is invoked once every time an instance of a class is created.
The instance initialization block is invoked directly after a call to super(). Do not forget about the implicit super() call if you do not explicitly put it in your constructor.
Multiple instance initialization blocks execute top-down.