设有数组定义: int a[] = { 10 , 50 , 30 , 40 , 80 , 60 , 20 , 30 , 90 , 20 };
将输出结果填写在输出语句后的注释中。
public int get ( int score[]){
m =score[0];
for ( int i = 0;i < score. length ;i++){
if ( m < score[i]){
m = score[i];
}
}
return m ;
}
a[] 带入 get 方法后, m 取值为 1