一: private String[] data = new String[]{"Hello", "jike", "world"};
二: 创建数组对象:
private CellData[] data = 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";}
时间: 2024-12-20 08:11:57