1.下面哪一个关键字(保留字)在Java语言中未被使用到?
A. final
B. goto
C. enum
D. assert
正确答案:B
2.现在有如下一段代码
public class Test {
public int aMethod() {
static int i=0;
i++;
return i;
}
public static void main(String args[]) {
Test test = new Test();
test.aMethod();
int j = test.aMethod();
System.out.println(j);
}
}
将产生哪种结果?
A. Compilation will fail
B. Compilation will succeed and the program will print“0”
C. Compilation will succeed and the program will print“1”
D. Compilat