本帖最后由 徐小骥 于 2012-8-4 16:54 编辑
public class test{
class Student{
private String name;
private int age;
private int achievement;
public Student (String name,int age,int achievement){
this.name=name;
this.age=age;
this.achievement=achievement;
}
...
}
public static void main(String[] args){
new Student("张三","2","87");//这代码提示:The constructor test10.Student(String, String, String) is undefined
...
...
}
}
我构造的函数是Student(String, int, int) ,插入的数据是 String, int, int ,编译的时候提示找不到 构造函数Student(String, String, String)
这是怎么回事?我输入的是int类型,没输入String啊!!
|