关于老师写的NewsBean的问题
老师,android项目创建bean都不需要get,set方法是吗?
老师,android项目创建bean都不需要get,set方法是吗?
2015-12-09
有啊 如下
public void setChecked(boolean isChecked) { this.isChecked = isChecked; } public boolean isChecked() { return isChecked; } public Bean() { } public Bean(String title, String desc, String time, String phone) { super(); this.title = title; this.desc = desc; this.time = time; this.phone = phone; } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public String getDesc() { return desc; } public void setDesc(String desc) { this.desc = desc; } public String getTime() { return time; } public void setTime(String time) { this.time = time; } public String getPhone() { return phone; } public void setPhone(String phone) { this.phone = phone; } }
举报