2014计算机二级Java程序设计真题及答案(网友版)
![](http://www.onekao.net/templets/default/images/content_ad.gif)
2014计算机二级Java程序设计真题及答案(网友版)
#
特别说明:以下试题及答案为网友提供,仅供参考! #
本题的功能是计算二维数组arr[][]={{34,21,45,67,20),{23,10,3,45,76},{22,3,79,56,50}}中的最小值,并输出。
#
#
![](http://wximg.233.com/special/2014/3/635315290397541853.jpg)
![](http://wximg.233.com/special/2014/3/635315287834934844.jpg)
public class javal{
#
public static void main(String[]args){
#
javal temp=new javal(); #
int res=max(67,23); #
System.out.println("res="+res); #
} #
static int maX( ){
#
int maxNum;
#
if(a>b)
; #
else
maxNum=b; #
; #
} #
}
二、基本操作题(共18分)
#
本题统计score[]={37,89,63,60,59,78,91)中成绩不
及格的人数。
public class javal{ #
public static void main(String[]args){ #
int score[]={37,89,63,60,59,78,91),
#
int sum=0: #
int i=0;
#
while(i if(score[i]>=60){ #
;
#
; #
} #
;
#
i++; #
}
System.OUt.println("below 60 sum:"+sum);
#
}
#
}
23.下列代码的执行结果是( )。 #
public class Test
{
#
public static void main(String args[]) #
{
#
System.out.println(5/2);
#
System.OUt.println(100%3.O)
}
} #
A.2和1 #
B.2和1.0
C.2.5和1
D.2.5和1.0 高手指点呀
34.resume()方法恢复( )的执行。 #
A.通过调用stop()方法而停止的线程 #
B.通过调用sleep()方法而停止运行的线程 #
C.通过调用wait()方法而停止运行的线程 #
D.通过调用suspend()方法而停止运行的线程 #