classloader JVM,
1.)
2.)
( , ..
(a.) , (b.) , (c.) )
3.)
, (link) classloader ( ) ( ), - null.
Now, during the initialization phase, static variables are assigned their actual value, and a- null. Because the method mainwill be launched after this step.
Thus, a avalue is assigned inside the main one "test", and is balready assigned by the class loader during initialization, when ait is NULL, which is why the reason String bhas a strange output.
source
share