问题 1
The order of methods in a class is immaterial(无关紧要的).
A.false
B.true
问题 2
Given the declaration Circle[] x = new Circle[10], which of the following statement is most accurate?
A.x contains a reference to an array and each element in the array can hold a Circle object.
B.x contains an array of ten int values.
C.x contains a reference to an array and each element in the array can hold a reference to a Circle object(对圆对象的引用).
D.x contains an array of ten objects of the Circle type.
问题 3
Suppose you wish to provide an accessor method(访问器方法) for a boolean property(布尔属性) finished, what signature of the method should be?
A.public void isFinished()
B.public void getFinished()
C.public boolean getFinished()
D.public boolean isFinished()
问题 4
If the parameter is of a primitive type(基元类型), both formal parameter(形式参数) and actual parameter(实际参数) reference to the same memory.(如果参数是基元类型,则形式参数和实际参数都引用同一内存)
A.false
B.true
问题 5
What is the printout for the first statement in the main method?
public class Test {
private int i = 0;
static int j = 0;
public static void main(String[] args) {
new Test();
}
public Test() {
i++;
j++;
i