下面哪些代码可以正确编译
(A)double d = 1.0;
int i = 1;
if(d == i) {
System.out.println(“Hello world”);
}
(B)int i = 1;
int j = 2;
if(i = 1 && j = 2) {
System.out.println(“Hello world”);
}
(C)boolean b1 = true, b2 = false;
if(b1 == b2) {
System.out.println(“Hello world”);
}
(D)int i = 0;
if(i) {
System.out.println(“Hello world”);
} |
|