interface UserInterface {
public Student student;
}
Class Student{
public String stuName;
public Student(String name){
this.stuName = name;
}
}
UserInterface ui = new UserInterface()
Student student = ui.getStudent();
String stuName student.getStuName();
根据你的代码,可以肯定接口里边有一个属性是Student类型的;但是Student类这却没有字符串类型的属性用来存储学生姓名,而且构造方法中缺少对这个属性的赋值。
= new Student(ui.getStudent());