class Demo
{
public static void main(String[] args)
{
//二维数组比大小
int[][] arry = {{34,54,656,43},{23,45,65,66,},{38,54,65,23,23}};
//假如是第一个数是最大得.
int max = arr[0][0];
//遍历数组;
for(int i = 0 ; i < arry.length; i++ ){
for(int j = 0 j < arry.length ; j++){
if(arry[i][j] > max){
max = arry[i][j];
}
}
}
System.out.println(max);
}
}
|