java二维数组的遍历和JS的数组比较

Object[][] srcs = {
    {1514l, "Capri_Anderson_02.jpg", "righthosting"},
    {1525l, "Capri_Anderson_13.jpg", "righthosting"},
    {15680l, "Prinzzess_Sahara_12.jpg", "righthosting"}
};

public void aa(){
    for(int i=0;i<srcs.length;i++){
        Object[] d = srcs[i];
        Long id = (Long) d[0];
        String name = (String) d[1];
        String prefix = (String) d[2];
    }
}

 

JS数组定义:
var lis = new Array('sort_AG','sort_HN','sort_OT','sort_UZ');
for (var i=0; i < lis.length; i++){
     lis[i]
}

 

你可能感兴趣的:(java)