二维数组
2021-01-24 13:16
标签:ring main 二维 pack ack static for i++ str 一. 二维数组遍历 package test_1; public class test_7 { 二. 二维数组求和 package test_1; public class test_8 { public static void main(String[] args) { } 二维数组 标签:ring main 二维 pack ack static for i++ str 原文地址:https://www.cnblogs.com/cloudLi/p/12864702.html
public static void main(String[] args) {
int[][] arr = {{1,2,3},{5,6},{12,13,14}};
for(int i=0; i for(int j=0; j System.out.print(arr[i][j] +" ");
}
System.out.println("");
}
}
}
int[][] arr = {{33,44,55},{77,55,33},{33,55,77},{99,88,77}};
int sum =0;
for(int i=0; i for(int j=0; j sum =sum +arr[i][j];
}
}System.out.println(sum);
}