帮我看看为什么会报错呢
package org.lxh.info.vo;import java.util.Date;
public class Peron {
private int pid;
private String name;
private int age;
private Date birthday;
private String address;
public Peron(){
super();
}
public Person(int pid,String name,int age,Date birthday,String address){
this.pid = pid;
this.name = name;
this.age = age;
this.birthday = birthday;
this.address = address;
}
public int getPid() {
return pid;
}
public void setPid(int pid) {
this.pid = pid;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public int getAge() {
return age;
}
public void setAge(int age) {
this.age = age;
}
public Date getBirthday() {
return birthday;
}
public void setBirthday(Date birthday) {
this.birthday = birthday;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
}
红线部分报错,原因是Return type for the method is missing 怎么解决啊 我想写向构造方法内传入参数 class --------------------编程问答-------------------- 搞笑了吧。类是:Peron
方法你写:Person了自己看 --------------------编程问答-------------------- ………………看看你的class名称和构造函数名称!!!
写错啦!!! --------------------编程问答-------------------- 记事本敲的吧,eclipse中就不会出现这种错误的哦 --------------------编程问答-------------------- class 类名和构造方法的方法名不一样
话说这样eclipse不报错吗 --------------------编程问答-------------------- 拼写错误,这个用专业的工具就会避免了。 --------------------编程问答-------------------- 单词写错了,类名是Peron,构造方法名是Person --------------------编程问答-------------------- --------------------编程问答-------------------- 除 --------------------编程问答-------------------- 又见记事本高手出现。。。。 --------------------编程问答-------------------- 撸主易做图笑了。。。 --------------------编程问答-------------------- 类名和构造方法名不一致
补充:Java , Java SE