二维数组赋值

二维数组赋值


List<ZigBeeVO> data =service.list(zVo);

int size = data.size();

String[][] daArr = new String[size][2];


for (int i = 0; i < data.size(); i++) { 

    for (int j = 0; j < 2; j++) { 

        ZigBeeVO zVo2 = data.get(i);

    if(j == 0){

    daArr[i][j] = zVo2.getMhfDatetime(); 

    }else{

daArr[i][j] = zVo2.getMhfValue();

    }

}



//[[3, 73.90], [4, 74.90], [5, 75.90], [6, 76.90], [7, 77.90], [8, 78.90], [9, 79.90]]

你可能感兴趣的:(数组,赋值,二维)