Bean:
public class Data extends BaseBean {
public ArrayList<DataItem> data = new ArrayList<Promotion>(); public static class DataItem {
public String image = "";
public String leftFlag = "";
public String rightFlag = "";
public String id = "";
public String title = "";
}
}
特点:
1.使用静态内部类,无需新建.java文件定义集合成员DataItem
2.建议定义时给予成员赋初值,以免在使用的时候出现空指针异常的情况(集合和字符串都给初值)