public class Person { }
public class Student extends Person{
private String name; public Student(String name) {
this.name = name;
} public Student() {
} public String getName() {
return name;
} public void setName(String name) {
this.name = name;
} @Override
public String toString() {
return "Student{" +
"name='" + name + '\'' +
'}';
}
}
泛型类型变量只能调用限定类或限定接口里面的方法