public class person { private String name; private int age; public person()
{//alt+shift+s 在加c,创建父类空参构造函数 super(); } public person(String name, int age)
{//alt+shift+s 在加o,根据成员变量,创建父类有参构造函数 super(); this.name = name; this.age = age;
} public String getName() {//alt+shift+s 在加r,创建get和set方法 return this.name; }
public void setName(String name) { this.name = name; } public int getAge() {
return this.age; } public void setAge(int age) { this.age = age; } }
 

友情链接
KaDraw流程图
API参考文档
OK工具箱
云服务器优惠
阿里云优惠券
腾讯云优惠券
华为云优惠券
站点信息
问题反馈
邮箱:ixiaoyang8@qq.com
QQ群:637538335
关注微信