Learn Java Programming - Instance Initialization Block Part 1 Tutorial

Published: 16 August 2015
on channel: Daniel Ross
2,175
29

Up until this point, I have discussed two ways that we can execute statements in a class: constructors and methods. This tutorial will introduce you to a third way – the initialization block. There are two types of initialization blocks, an instance initialization block and a static initialization block. This tutorial will discuss only the instance initialization block, I will be discussing the static initialization block after the part 2 tutorial. An instance initialization block is simply a pair of opening and closing braces inside of a class, but not inside of a method or constructor. Statements inside of the block are executed as an instance of the class is created.


On this page of the site you can watch the video online Learn Java Programming - Instance Initialization Block Part 1 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 2,175 times on youtube and it was liked by 29 viewers. Enjoy your viewing!