好吊妞这里只有精品_美女视频黄a视频全免费应用_亚洲区一二三四区2021_色多多污污下载

當前位置:

Java考試格林模擬試題3

發表時間:2015/9/14 15:01:13 來源:互聯網 點擊關注微信:關注中大網校微信
關注公眾號

question 11)

what will be the result of attempting to compile and run the following code?

abstract class minebase { abstract void amethod(); static int i;}public class mine extends minebase { public static void main(string argv[]){ int[] ar=new int[5]; for(i=0;i < ar.length;i++) system.out.println(ar[i]); }}

1) a sequence of 5 0’s will be printed

2) error: ar is used before it is initialized

3) error mine must be declared abstract

4) indexoutofboundes error

question 12)

what will be printed out if you attempt to compile and run the following code ?

int i=1; switch (i) { case 0: system.out.println("zero"); break; case 1: system.out.println("one"); case 2: system.out.println("two"); default: system.out.println("default"); }

1) one

2) one, default

3) one, two, default

4) default

question 13)

what will be printed out if you attempt to compile and run the following code?

int i=9;switch (i) { default: system.out.println("default"); case 0: system.out.println("zero"); break; case 1: system.out.println("one"); case 2: system.out.println("two");}

1) default

2) default, zero

3) error default clause not defined

4) no output displayed

編輯推薦:

JAVA認證考試報考指南 / 更多JAVA考試模擬試題

(責任編輯:zyc)

2頁,當前第1頁  第一頁  前一頁  下一頁
最近更新 考試動態 更多>

考試科目