import java.lang.reflect.Field;
class Student {
    int stu_code;                                         // 学号
    String stu_name;                                      // 学生姓名
    int getStudentCode() {
        return stu_code;
    }
}
class Example5_3 {
    public static void main(String args[]) {
        Student student = new Student();
        Class cs = student.getClass();                       // 获取Student类相关的Class对象
        String className = cs.getName();
        Field[] field = cs.getDeclaredFields();
        for (int i = 0; i < field.length; i++) {
            System.out.println(className + "类的第" + (i+1) + "个变量为："+ field[i].toString());
        }
    }
}
