What is the output of the following code?
class Test { private final int y; { y = 10; System.out.println(y); } { System.out.println("hi"); } } public class Main { public static void main(String[] args) { new Test(); } }
10 hi
The following code will compile because it initializes y in an instance initializer: