Question: Declare a variable named boolean0 of type boolean, with an initial value of true. Declare a variable named boolean1 of type boolean, with an initial
Declare a variable named boolean0 of type boolean, with an initial value of true.
Declare a variable named boolean1 of type boolean, with an initial value of false.
Write two System.out.println statements that print boolean0 and boolean1, as shown below.
NOTE: Do not put quotes around boolean values, they're not strings!
Declare a variable named equals of type boolean, and set it's value to the comparison (11 == 33).
Declare a variable named notEquals of type boolean, and set it's value to the comparison (22 !=44).
Declare a variable named greaterThan of type boolean, and set it's value to the comparison (15 > 25).
Declare a variable named lessThan of type boolean, and set it's value to the comparison (-11 < 13).
Write System.out.println statement to print each variable above, as shown below.
sample Output
boolean0 is true. boolean1 is false. (11 == 33) is false (22 != 44) is true (15 > 25) is false (-11 < 13) is true
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
