广元煌褂旅行社

當前位置:

JAVA認證考試專業(yè)語言模擬試題小測天天練7

發(fā)表時間:2015/6/11 14:14:32 來源:互聯(lián)網(wǎng) 點擊關(guān)注微信:關(guān)注中大網(wǎng)校微信
關(guān)注公眾號

Q1

A method is ...

1) an implementation of an abstraction.

2) an attribute defining the property of a particular abstraction.

3) a category of objects.

4) an operation defining the behavior for a particular abstraction.

5) a blueprint for making operations.

Q2

An object is ...

1) what classes are instantiated from.

2) an instance of a class.

3) a blueprint for creating concrete realization of abstractions.

4) a reference to an attribute.

5) a variable.

Q3

Which line contains a constructor in this class definition?

public class Counter { // (1)

int current, step;

public Counter(int startValue, int stepValue) { // (2)

set(startValue);

setStepValue(stepValue);

}

public int get() { return current; } // (3)

public void set(int value) { current = value; } // (4)

public void setStepValue(int stepValue) { step = stepValue; } // (5)

}

1) Code marked with (1) is a constructor

2) Code marked with (2) is a constructor

3) Code marked with (3) is a constructor

4) Code marked with (4) is a constructor

5) Code marked with (5) is a Constructor

Q4

Given that Thing is a class, how many objects and reference variables are created by the following code?

Thing item, stuff;

item = new Thing();

Thing entity = new Thing();

1) One object is created

2) Two objects are created

3) Three objects are created

4) One reference variable is created

5) Two reference variables are created

6) Three reference variables are created.

編輯推薦:

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

(責任編輯:)

2頁,當前第1頁  第一頁  前一頁  下一頁
最近更新 考試動態(tài) 更多>
河池市| 清远市| 安溪县| 安康市| 平罗县| 崇文区| 天祝| 博爱县| 葫芦岛市| 墨脱县| 闸北区| 廊坊市| 寿光市| 营山县| 同仁县| 涿鹿县| 福安市| 广汉市| 棋牌| 离岛区| 西藏| 青阳县| 东至县| 连城县| 宁都县| 盘锦市| 江门市| 泰和县| 杭锦旗| 莫力| 湟源县| 陕西省| 瑞金市| 英吉沙县| 九江县| 崇明县| 日土县| 抚州市| 浦县| 平江县| 富顺县|