實現代碼如下:
List<String[]> userList = new ArrayList();
for (int jj = 0; jj < 10; jj++) {
String[] dto = new String[2];
dto[0] = "編號" + jj;
dto[1] = "名稱rname" + jj;
userList.add(dto);
}
if (userList != null && userList.size() > 0) {
for (int i = 0; i < userList.size(); i++) {
String[] ab = userList.get(i);
System.out.println(ab.toString());
for (int j = 0; j < ab.length; j++) {
String b = ab[j];
}
}
}