1、定义好变量之后,在空白处鼠标右击
3、然后点击“Source”之后,右边弹出的菜单中,选择“Generate Getters and Setters...”
5、如图,getset方法就非常方便快捷的定义出来了