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.
In questa pagina del sito puoi guardare il video online Learn Java Programming - Instance Initialization Block Part 1 Tutorial della durata di ore minuti seconda in buona qualità , che l'utente ha caricato Daniel Ross 16 agosto 2015, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 2,175 volte e gli è piaciuto 29 spettatori. Buona visione!