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.
Auf dieser Seite können Sie das Online-Video Learn Java Programming - Instance Initialization Block Part 1 Tutorial mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Daniel Ross 16 August 2015 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 2,175 Mal angesehen und es wurde von 29 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!