20 java 中快速生产 get set 方法

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 方法)