Learn Java Programming - Static Initialization Block Tutorial

Опубликовано: 16 Август 2015
на канале: Daniel Ross
4,915
59

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.


На этой странице сайта вы можете посмотреть видео онлайн Learn Java Programming - Static Initialization Block Tutorial длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь Daniel Ross 16 Август 2015, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 4,915 раз и оно понравилось 59 зрителям. Приятного просмотра!