Question: java. the output is x z false Can you explain me the following code? public class BoolTest { public static void main(String[] args) { Boolean
java. the output is
x z
false
Can you explain me the following code?
public class BoolTest {
public static void main(String[] args) {
Boolean b1 = new Boolean("false");
boolean b2;
b2 = b1.booleanValue();
if (!b2) {
b2 = true;
System.out.print("x ");
}
if (b1 & b2) {
System.out.print("y ");
}
System.out.println("z");
System.out.println(b1);
}
}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
