This tutorial will build on concepts from both my Instance Initialization Block Part 1 and Instance Initialization Block Part 2 tutorials. I highly recommend watching those tutorials before continuing with this tutorial.
There are some major differences between instance and static initialization blocks. A static initialization block is not dependant upon a constructor to be invoked. A static initialization block is executed when the class is first accessed, either to create an instance, or to directly access a class variable or a static method. A static Initialization block will only be executed once throughout the entire program; it won't matter how many objects you create or if you directly access a static member a bazillion times.
Auf dieser Seite können Sie das Online-Video Learn Java Programming - Static Initialization Block 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 4,915 Mal angesehen und es wurde von 59 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!