Tag: static and non-static block
-
Static Block and Non-Static Block
Static Initialization Block in Java: When a block is declared with the static keyword, it is called static block in Java. It is a normal block of code that is enclosed in braces ({ }) and is preceded by a keyword “static”. Static block is also known as static initialization block or static initializer block in Java.…