Question: Please explain the follwoing java code: public class BoolTest { public static void main(String[] args) { Boolean b1 = new Boolean(false); boolean b2; b2 =
Please explain the follwoing java 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");
}
}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
