Consider the classes shown below :
class A {/*from w ww.j a v a 2 s . co m*/ public A() { } public A(int i) { System.out.println(i); } } class B { static A s1 = new A(1); A a = new A(2); public static void main(String[] args) { B b = new B(); A a = new A(3); } static A s2 = new A(4); }
Which is the correct sequence of the digits that will be printed when B is run?
Select 1 option
Correct Option is : B
The order of initialization of a class is: