Multiple Choice Question

Quiz Guidelines

 

QID: 
152
Question: 

What is the result of executing the following fragment of code:

boolean b1 = false;
boolean b2 = false;
if (b2 != b1 = !b2){
System.out.println("true");
}else{
System.out.println("false");
}

Select 1 option

A. Compile time error.
B. It will print true.
C. It will print false.
D. Runtime error.
E. It will print nothing.

Q&A Set: