各位大虾 代码如下
package example1;
class Person
{
private String name;
private int age;
public void setName(String name)
{
this.name=name;
}
public void setAge(int age)
{
this.age=age;
}
public String getName()
{
return name;
}
public int getAge()
{
return age;
}
class Student extends Person
{
private String school;
public String getSchool()
{
return school;
}
public void setSchool(String school)
{
this.school=school;
}
}
}
public class Test {
public static void main(String[] args) {
// TODO Auto-generated method stub
}
}
为什么我在主函数中new student 会报错,说找不到student这个类呢