济宁蓖乒工艺品有限责任公司

當(dāng)前位置:

JAVA認(rèn)證公共基礎(chǔ)知識(shí)指導(dǎo)練習(xí)題(2)

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

4:

1.10 What is the result of compiling and executing the following code?

public class ThreadTest extends Thread {

public void run() {

System.out.println("In run");

yield();  System.out.println("Leaving run");

}

public static void main(String args []) {

(new ThreadTest()).start();

}

}

A. The code fails to compile in the main() method.

B. The code fails to compile in the run() method.

C. Only the text "In run" will be displayed.

D. The text "In run" followed by "Leaving run" will be displayed.

E. The code compiles correctly, but nothing is displayed.

Answer: D

5:

1.12 Which of the following will definitely stop a thread from executing?A. wait()B. notify()C. yield()D. suspend()E. sleep()Answer: ACDE

6:

1.12 Which of the following will definitely stop a thread from executing?

A. wait()

B. notify()

C. yield()

D. suspend()

E. sleep()

Answer: ACDE

編輯推薦:

JAVA認(rèn)證公共基礎(chǔ)知識(shí)指導(dǎo)練習(xí)題匯總

JAVA認(rèn)證考試報(bào)考指南 / 更多JAVA考試模擬試題

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

2頁(yè),當(dāng)前第1頁(yè)  第一頁(yè)  前一頁(yè)  下一頁(yè)
最近更新 考試動(dòng)態(tài) 更多>
虎林市| 江西省| 全椒县| 合山市| 永胜县| 隆子县| 龙井市| 汉寿县| 安远县| 井陉县| 西畴县| 临朐县| 策勒县| 重庆市| 民县| 哈巴河县| 普格县| 石嘴山市| 原平市| 句容市| 永年县| 泗阳县| 甘德县| 睢宁县| 清水县| 武山县| SHOW| 台北县| 达孜县| 梁山县| 平湖市| 清河县| 葵青区| 太白县| 疏勒县| 武冈市| 泗水县| 桐梓县| 汽车| 如东县| 潮安县|