This question is asked and explained in JAVA PROGRAMMING LANAGUAGE book.But i m not clear with explaination.
Can someone Explain it more clearly ?
Explaination in book is ::
This cyclic static initialization cannot be reliably detected during compilation because the code for Y may not be written when X is compiled. If cycles happen, X's static initializers will have been executed only to the point where Y's method was invoked. When Y, in turn, invokes the X method, that method runs with the rest of the static initializers yet to be executed. Any static fields in X that haven't had their initializers executed will still have their default values (false, '/u0000', zero, or null depending on their type).