package newProject;
public class Student {
private int stuNum;
private String name;
//java 中快速生产 get set 方法
//右键->source->genearate getter and setter
@Override
public String toString() {
return "Student [stuNum=" + stuNum + ", name=" + name + "]";
}
public int getStuNum() {
return stuNum;
}
public void setStuNum(int stuNum) {
this.stuNum = stuNum;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public static void main(String[] args) {
}
}
20 java 中快速生产 get set 方法
最新推荐文章于 2022-10-16 21:31:08 发布