一、setters()方法
如果想让别人修改你的属性,可以给一个方法
public void Setsno(int sno){
this.sno=sno;
}
二.getters()方法
获得属性值
public int getSno(){
return sno;
}
一、setters()方法
如果想让别人修改你的属性,可以给一个方法
public void Setsno(int sno){
this.sno=sno;
}
二.getters()方法
获得属性值
public int getSno(){
return sno;
}