纠错
全专业资料、题库、学位、网课
最高直省2344元
上千+科次精品网课
买网课即送全真模考题库
五千+科次教材资料
电子资料满三件9折
五千+科次在线题库
全真呈现历年考试试题
1、[填空题]方法调用 Math.max(99,88)返回的结果是_______。
2、[填空题]Java 中, 是可以用来实现类间多重继承功能的结构。
3、[填空题]设有数组定义: int MyIntArray[ ] = { 10 , 20 , 30 , 40 , 50 , 60 , 70 , 80 , 90 , 100 }; 则执行以下几个语句后的输出结果
是 。
int s = 0 ;
for ( int i = 0 ; i < MyIntArray.length ; i + + )
s += MyIntArray[i] ;
System.out.println( s );
4、[填空题]Java 语言中关键字 interface 用来定义一个_____。
5、[主观题]阅读程序回答以下问题
1: public class A {
2: public static void main(String args[]) {
3: try{
4: int x[]={1,2,3};
5: int k=Integer.parseInt(args[0]);
6: System.out.println(x[k]);
7: System.out.println("try 结束! ");
8: }
9: catch(ArrayIndexOutOfBoundsException e){
10: System.out.println("执行 catch");
11: }
12: finally{
13: System.out.println("执行 finally");
14: }
15: System.out.println("程序结束! ");
16: }
17: }
(1)若在命令行编译该程序后, 键入下面的内容运行该程序:
java A 1
则程序输出的结果如何(2 分)?
(2) 若在命令行编译该程序后, 键入下面的内容运行该程序:
java A 3
则程序输出的结果如何(3 分)?
Copyright © 2010 - 2023 湖南求实创新教育科技有限公司 All Right Reserved.
温馨提示:如您需要的资料本网暂时没有,请于工作日08:00-18:00,点击这里,联系客服及时补充资料。