常州酌乒文化传播有限公司

當前位置:

Java考試格林模擬試題2

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

question 6)

which of the following are keywords or reserved words in java?

1) if

2) then

3) goto

4) while

5) case

question 7)

which of the following are legal identifiers

1) 2variable

2) variable2

3) _whatavariable

4) _3_

5) $anothervar

6) #myvar

question 8)

what will happen when you compile and run the following code?

public class myclass{ static int i; public static void main(string argv[]){ system.out.println(i); }}

1) error variable i may not have been initialized

2) null

3) 1

4) 0

question 9)

what will happen if you try to compile and run the following code?

public class q { public static void main(string argv[]){ int anar[]=new int[]{1,2,3}; system.out.println(anar[1]); }}

1) 1

2) error anar is referenced before it is initialized

3) 2

4) error: size of array must be defined

question 10)

what will happen if you try to compile and run the following code?

public class q { public static void main(string argv[]){ int anar[]=new int[5]; system.out.println(anar[0]); }}

1) error: anar is referenced before it is initialized

2) null

3) 0

4) 5

編輯推薦:

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

(責任編輯:zyc)

2頁,當前第1頁  第一頁  前一頁  下一頁
最近更新 考試動態(tài) 更多>
梨树县| 贡山| 商河县| 布拖县| 宜昌市| 揭东县| 湖口县| 津南区| 墨竹工卡县| 武威市| 江西省| 甘肃省| 渭南市| 奉新县| 涿鹿县| 勃利县| 汝南县| 高陵县| 肃宁县| 安庆市| 于都县| 连平县| 舟曲县| 阿城市| 肇州县| 红安县| 濉溪县| 五常市| 潼关县| 宜章县| 淅川县| 克什克腾旗| 游戏| 临武县| 高邑县| 温泉县| 临澧县| 堆龙德庆县| 内丘县| 阿鲁科尔沁旗| 安宁市|