public class Test {
public static class Parent {
protected String name = "Super";
}
public static class Child extends Parent {
protected String name = "child";
}
public static void main(String[] args) {
Parent parent = new Parent();
System.out.println(parent.name);
Parent child = new Child();
System.out.println(child.name);
}
}