java中二维数组遍历
public class Demoshuzu2 {
public static void main(String[] args) {
int[][] arr2 = {{78,79,65,87,95},{96},{45,85,62},{545,555,666}};//定义一个二维数组
for(int i=0;i<arr2.length;i++){
for(int j=0;j<arr2[i].length;j++){
System.out.print(arr2[i][j]+”,”);
}
System.out.println();
}
}
}