遍历二维数组

public class CeShi {

    public static void main(String[] args) {
int [][]a={{1},{2,3},{4,5,6}};
 
  for (int []b:a){
     for(int i:b){
         System.out.println(i);
     }
  }
 }
}

 

posted @ 2017-04-03 19:53  苏轼的红烧肉  阅读(142)  评论(0编辑  收藏  举报