What will be brought up in the console?

public class Test {    
    {
        System.out.println("1");
    }

    Test () {
        System.out.println("2");
    }
    
    static {
        System.out.println("3");
    }
    
    {
        System.out.println("4");
    }

    public static void main(String[] args) {
        new Test();
    }
}

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback
Keep exploring
Java quizzes
Cosmo
Sign Up Now
or Subscribe for future quizzes