Static initialization blocks are executed before calling the main method and before the first instance of the class in which they are declared. Non-static initialization blocks are executed when the class is instantiated. Therefore, in this example, the first "System.out.print("3");" will be executed and then starts to work the method main - "System.out.print("2");" will be executed and finally, during the instillation of the exemplar of QTest System.out.print("1");" will be executed.
The correct answer - "The console will indicate 321".
Login in to like
Login in to comment