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.
On this page of the site you can watch the video online Learn Java Programming - Instance Initialization Block Part 2 Tutorial with a duration of hours minute second in good quality, which was uploaded by the user Daniel Ross 16 August 2015, share the link with friends and acquaintances, this video has already been watched 787 times on youtube and it was liked by 25 viewers. Enjoy your viewing!