Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Java - Static Initializer
class StaticTest {
static int i;
static {
System.out.println("Static Initialization block is called");
i = 10;
StaticTest() {
System.out.println("Static Test Constructor is called");
class Main {
public static void main (String args[]){
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment