首页 > 试题广场 >

给出下面代码的输出: public class Test

[问答题]
给出下面代码的输出:
public class Test {
 public static void main(String[] args){
 int[][] array = {{1, 2, 3, 4},{5, 6, 7,8}}
System.out.println(ml(array)[0]);
 System.out.println(ml(array)[1]); 
}
 public static int[] ml(int[][] m){ 
int[] result
-
new int[2];
  result[0] = m.length;
 result[l] = m[0].length;
 return result;
}
}

这道题你会答吗?花几分钟告诉大家答案吧!