欧美精品在欧美一区二区少妇,久久久久成人影视,99热在线精品呀,草莓视频手机在线观看

當(dāng)前位置:

JAVA認(rèn)證歷年真題:SCJP考試真題和解析5

發(fā)表時(shí)間:2014/4/21 9:54:51 來(lái)源:互聯(lián)網(wǎng) 點(diǎn)擊關(guān)注微信:關(guān)注中大網(wǎng)校微信
關(guān)注公眾號(hào)

3。B

請(qǐng)查閱JAVA類(lèi)庫(kù)。getID方法的返回值是“event type”。在認(rèn)證考試中,總會(huì)有類(lèi)似的書(shū)本以外的知識(shí),這只能靠多實(shí)踐來(lái)增長(zhǎng)知識(shí)了。

4. Which statement about listener is true?

A. Most component allow multiple listeners to be added.

B. If multiple listener be add to a single component, the event only affected one listener.

C. Component don?t allow multiple listeners to be add.

D. The listener mechanism allows you to call an addXxxxListener method as many times as is needed, specifying as many different listeners as your design require.

4。A、D

控件可以同時(shí)使用多個(gè)“addXxxxListener”方法加入多個(gè)監(jiān)聽(tīng)器。并且當(dāng)多個(gè)監(jiān)聽(tīng)器加入到同一控件中時(shí),事件可以響應(yīng)多個(gè)監(jiān)聽(tīng)器,響應(yīng)是沒(méi)有固定順序的。

5.Give the following code:

public class Example{

public static void main(String args[] ){

int l=0;

do{

System.out.println(“Doing it for l is:”+l);

}while(--l>0)

System.out.println(“Finish”);

}

}

Which well be output:

A. Doing it for l is 3

B. Doing it for l is 1

C. Doing it for l is 2

D. Doing it for l is 0

E. Doing it for l is ?C1

F. Finish

5。D、F

本題主要考察考生對(duì)流程控制的掌握情況。這是當(dāng)型循環(huán),條件為真執(zhí)行,條件為假則退出。循環(huán)體至少執(zhí)行一次,故會(huì)輸出D。循環(huán)體以外的語(yǔ)句總會(huì)被執(zhí)行,故輸出F。

6. Give the code fragment:

1) switch(x){

2) case 1:System.out.println(“Test 1”);break;

3) case 2:

4) case 3:System.out.println(“Test 2”);break;

5) default:System.out.println(“end”);

6) }

which value of x would cause “Test 2” to the output:

A. 1

B. 2

C. 3

D. default

6。B.C

在開(kāi)關(guān)語(yǔ)句中,標(biāo)號(hào)總是不被當(dāng)做語(yǔ)句的一部分,標(biāo)號(hào)的作用就是做為條件判斷而已,一旦匹配成功,就執(zhí)行其后的語(yǔ)句,一直遭遇break語(yǔ)句為止。(包括default語(yǔ)句在內(nèi))

7. Give incompleted method:

1)

2) { if(unsafe()){//do something…}

3) else if(safe()){//do the other…}

4) }

The method unsafe() well throe an IOException, which completes the method of declaration when added at line one?

A. public IOException methodName()

B. public void methodName()

C. public void methodName() throw IOException

D. public void methodName() throws IOException

E. public void methodName() throws Exception

7。D、F

IOException異常類(lèi)是Exception的子類(lèi)。根據(jù)多態(tài)性的定義,IOException對(duì)象也可以被認(rèn)為是Exception類(lèi)型。還要注意在方法聲明中拋出異常應(yīng)用關(guān)鍵字“throws”。

8. Give the code fragment:

if(x>4){

System.out.println(“Test 1”);}

else if (x>9){

System.out.println(“Test 2”);}

else {

System.out.println(“Test 3”);}

Which range of value x would produce of output “Test 2”?

A. x<4

B. x>4

C. x>9

D. None

8。D

只有兩種情況:大于4時(shí)輸出“Test1”,小于等于4時(shí)輸出“Test3”。

9. Give the following method:

public void example(){

try{

unsafe();

System.out.println(“Test1”);

}catch(SafeException e){System.out.println(“Test 2”);

}finally{System.out.println(“Test 3”);}

System.out.println(“Test 4”);

Which will display if method unsafe () run normally?

A. Test 1

B. Test 2

C. Test 3

D. Test 4

9。A、C、D

在正常情況下,打印Test1、Test3、Test4;在產(chǎn)生可捕獲異常時(shí)打印Test2、Test3、Test4;在產(chǎn)生不可捕獲異常時(shí),打印Test3,然后終止程序。注意finally后面的語(yǔ)句總是被執(zhí)行。

10. Which method you define as the starting point of new thread in a class from which new the thread can be excution?

A. public void start()

B. public void run()

C. public void int()

D. public static void main(String args[])

E. public void runnable()

10。B

線(xiàn)程的執(zhí)行是從方法“run( )”開(kāi)始的,該方法是由系統(tǒng)調(diào)用的。程序員手工調(diào)用方法start(),使線(xiàn)程變?yōu)榭蛇\(yùn)行狀態(tài)

相關(guān)鏈接JAVA認(rèn)證考試報(bào)考指南  考試論壇 考試知道   考試動(dòng)態(tài)

(責(zé)任編輯:fky)

2頁(yè),當(dāng)前第1頁(yè)  第一頁(yè)  前一頁(yè)  下一頁(yè)
最近更新 考試動(dòng)態(tài) 更多>
欧美呦呦网| 国产一级a爱做片免费| 五月综合激情四色| 动漫3D成人H无码国漫| 亚洲综合网站色欲色欲| 国产精品xx| 丰满人妻精品一区二区| 狼很久久| 青青草无码在线播放| 91秦先生在线| 精品久久久久久无码专区不卡| 久久国产视频一区二区| 精品久久久久久久一区二区| 欧美酒色| 中国小骚货啪啪视频| swag午夜福利视频| 久久精品国产国产精| 久艹久艹| 在线观看午夜污| 国产精品蜜臀91导航| 狠狠操夜夜| 再深点灬舒服灬受不了了视频| 中文毛片无遮挡高清免费| 激情六月天成人网| 久久久久九有精品| 韩日AV在线| 国产精品老熟女色视频| 欧美喷水在线看| 91在线精品一区| 中文字幕国产精品| com欧美日韩| 国产丝袜无码一区二区视频| 青草亚洲av| 欧美亚洲日韩九色| 日本不卡高清| 天天天天干| 91动漫在线| 黄色Av 动作| 精品国产黑色丝袜高跟鞋| 日韩小视频一区| 大学生无套白浆|