Hi,
Here's the question:
Given:
class Titanic {
public static void main(
String[] args) {
Boolean bl = true;
boolean b2 = false;
boolean b3 = true;
if((bl & b2) | (b2 & b3) & b3)
System.out.print("alpha ");
if((bl = false) | (b1 & b3) | (bl | b2)) System.out.print("beta "};
}
}
What is the result?
A.beta
B.alpha
C.alpha beta
D.Compilation fails.
E.No output is produced.
F.An exception is thrown at runtime.
I am not completely satisfied with the explanation on the answer. Could you please carefully tell me what exactly is happening at this line?
if((bl = false) | (b1 & b3) | (bl | b2)) Thanks!