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.
Nesta página do site você pode assistir ao vídeo on-line Learn Java Programming - Instance Initialization Block Part 1 Tutorial duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário Daniel Ross 16 Agosto 2015, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 2,175 vezes e gostou 29 espectadores. Boa visualização!