首页 > 代码库 > android 创建数组

android 创建数组

一: private String[] data = http://www.mamicode.com/new String[]{"Hello", "jike", "world"};

二: 创建数组对象:

 

private CellData[] data = http://www.mamicode.com/new CellData[]{new CellData("jike", "world"), new CellData("title", "content")};

public class CellData {

public CellData(String title, String content){
this.content = content;
this.title = title;
}

public String title = "title";
public String content = "content";
}

android 创建数组