R
Roedy Green
It doesn't depend on allocating objects of B. But, if the
initialization of B's static field depends on executing from "main"
method (normally, it's the case), you got the same effect.
That's just a bug if you ever instantiate the class by any means other
than calling main.