package test;
public class Test {
public int sid;
public String sno;
public String sname;
public String sex;
public String sdate;
public String stel;
public String sadd;
public int getSid() {
return sid;
}
public void setSid(int sid) {
this.sid = sid;
}
public String getSno() {
return sno;
}
public void setSno(String sno) {
this.sno = sno;
}
public String getSname() {
return sname;
}
public void setSname(String sname) {
this.sname = sname;
}
public String getSex() {
return sex;
}
public void setSex(String sex) {
this.sex = sex;
}
public String getSdate() {
return sdate;
}
public void setSdate(String sdate) {
this.sdate = sdate;
}
public String getStel() {
return stel;
}
public void setStel(String stel) {
this.stel = stel;
}
public String getSadd() {
return sadd;
}
public void setSadd(String sadd) {
this.sadd = sadd;
}
public static void main(String[] args) {
Test test=new Test();
test.setSid(1);
test.setSno("HT142201");
test.setSname("黄桃");
test.setSex("女");
test.setStel("1244223");
test.setSdate("2002-2-2");
test.setSadd("湖南");
System.out.println(test.introduction());
}
public boolean introduction(){
System.out.println("Test [sid="+sid+",sno="+sno+",sname="+sname+",sex="+sex+",stel="+stel+",sdate="+sdate+",sadd="+sadd+"]");
return true;
}
}
楼主,你这样试下,你没有set、get方法,肯定得不到啊