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.
Sur cette page du site, vous pouvez voir la vidéo en ligne Learn Java Programming - Static Initialization Block Tutorial durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur Daniel Ross 16 août 2015, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 4,915 fois et il a aimé 59 téléspectateurs. Bon visionnage!