.
x , , "new A();" .
Seeing that x is not static, the processing is virtually the same, however in JLS there are nuances that you should be aware of, especially if A, for example, extends another class.
If you did something with x in the constructor before it was initialized (as in example 2), for example. int b = x; don't expect b to be 1. Outside the top of your head, you will either receive an error / warning message in the compiler, or b will be zero.
source
share