Static Block in Java with Example

Publicado el: 26 abril 2018
en el canal de: Automation Testing By Experts
1,353
31

Static block -
Static blocks are the normal block of code, enclosed in braces { }, preceded with static keyword.
Static blocks are used to initialize the static data member.
Static block is executed before main method.
Static blocks will be executed at the time of class loading.
A class can have multiple Static blocks, which will be executed from Top to Bottom.

Static blocks will be executed at the time of class loading hence if we want to perform any activity at the time of class loading we have to define that activity inside static block.


En esta página del sitio puede ver el video en línea Static Block in Java with Example de Duración hora minuto segunda en buena calidad , que subió el usuario Automation Testing By Experts 26 abril 2018, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 1,353 veces y le gustó 31 a los espectadores. Disfruta viendo!