精品91麻豆免费免费国产在线_男女福利视频_国产一区二区三区小向美奈子_在教室里和同桌做校园h文

當前位置:

JAVA認證考試專業語言模擬試題小測天天練4

發表時間:2015/6/8 11:32:54 來源:互聯網 點擊關注微信:關注中大網校微信
關注公眾號

uestion: 19

Given the following fragment of code:

boolean m = true;

if ( m = false )

System.out.println(False);

else

System.out.println(True);

What is the result of the execution?

A. False

B. True

C. None

D. An error will occur when running.

Explanation:

= is the assignment operator. == is the compare operator. In this question the value of false is assigned to the variable m.

Correct Answer: A 19 of 60

Question: 20

Given the following code:

public class Test{

public static void main(String arg[]){

int i = 5;

do {

System.out.println(i);

} while (--i>5)

System.out.println(“finished”);

}

}

What will be output after execution?

A. 5

B. 4

C. 6

D. Finished

E. None

Explanation:

The expressions in the block of do/while loop will be executed at least once. If the condition of this loop is not met the loop will stop after once execution, otherwise, it will continue to loop until the condition is no met.

Correct Answer: A,D 20 of 60

編輯推薦:

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


(責任編輯:)

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

考試科目