result的数据结构为List<Map<String,Object>> //将List转换为二维数组String[][] String[][] z = new String[result.size()][]; for(int i=0;i<z.length;i++){ Map m = (Map)result.get(i); Set set = m.keySet(); z[i] = new String[m.size()]; Iterator it =set.iterator(…
#以|为分割点,将arr转换为二维数组 arr = ['] tmp = [] tmp2 = [] for x in arr tmp << x if x != '|' tmp2.push Array.new(tmp) if x == "|" tmp.clear if x == "|" end tmp2.push Array.new(tmp) print tmp2 输出为: [["1", "2"], ["3&…
public <T> Object[][] toArrays(List<T> data){ Object[][] o=new Object[data.size()][20]; int w = 1; for (int i = 0; i < data.size(); i++) { BuSettlementDetailDTO Dto= (BuSettlementDetailDTO)data.get(i); o[i][0]=Integer.toString(w++); o[i][1]…