Multiple instance blocks

Report a typo

Here's a class A containing multiple instance initialization blocks:

class A {

    {
        System.out.println("block A");
    }

    public A() {
        System.out.println("constructor");
    }

    {
        System.out.println("block B");
    }
}

What is the order of outputs?

Select one option from the list
___

Create a free account to access the full topic