class Student{
    String name;
    static int lengthOfSchool=4;
}
class GraduateStudent extends Student {
    public String tutor;                                   
    public String spec_direction;                          
    static int lengthOfSchool = 3;                      //成员变量的隐藏
}
class Example4_4{
     public static void main(String[] args) {
        GraduateStudent stu1 = new GraduateStudent();
        stu1. name="张鸣宇";
        stu1. spec_direction="人工智能";
        stu1. tutor="宁鹏飞";
        System.out.println("姓名："+stu1.name+";研究方向："+stu1.spec_direction+ ";导师：" + stu1.tutor);
        System.out.println("直接访问父类的学制： " + Student.lengthOfSchool);
        System.out.println("直接访问子类的学制： " + stu1.lengthOfSchool);
    }
}
