2016-10-28 00:00:00嘉辉 IBM认证
(31)下列哪些语句能通过编译:(请选择3个正确答案 )
A String s = “john” + “ was ” + “ here”;
B String s = “john” + 3;
C int a = 3 + 5;
D int a = 5 + 5.5;
(32)用于测试两个逻辑表达式的值是否同时为true的逻辑操作符是:(选择一项 )
A &
B ||
C &&
D |
(33)编译和运行下列代码后结果是:(选择一项)
public class Test {
static int total = 10;
public static void main (String args []) {
new Test();
}
public Test () {
System.out.println(“In test”);
System.out.println(this);
int temp = this.total;
if (temp > 5) {
System.out.println(temp);
}
}
}
A 不能通过编译
B 编译器报第2行有错
C 编译器报第9行有错
D ..........
阅读全文867
人