-->
当前位置:首页 > 题库

单选题:What will happen when you attempt to compile and run the followi

Luz5年前 (2021-05-10)题库1241
What will happen when you attempt to compile and run the following code @[D](2)
```Java
int Output=10;
boolean b1 = false;
if((b1==true) && ((Output+=10)==20)){
System.out.println("We are equal "+Output);
} else {
System.out.println("Not equal! "+Output);
}
```

A. Compile error, attempting to preform binary comparison on logical data type

B. Compilation and output of "We are equal 10"

C. Compilation and output of "Not equal! 20"

D. Compilation and output of "Not equal! 10"




A.Compile error, attempting to preform binary comparison on logical data type
B.Compilation and output of "We are equal 10"
C.Compilation and output of "Not equal! 20"
D.Compilation and output of "Not equal! 10"


答案:D