here is the code
public class ClassResolution {
static class Parent {
public static String name;
static {
System.out.println(\"this is Parent
JLS#12.4.1. When Initialization Occurs
A reference to a static field (§8.3.1.1) causes initialization of only the class or interface that actually declares it, even though it might be referred to through the name of a subclass, a subinterface, or a class that implements an interface.
I guess above says it all..