Java Boolean Data Type Properties
All of the following statements about the boolean data type in Java are true EXCEPT:
boolean flag = true;
if(flag) {
System.out.println("Flag is true");
}
A
Boolean values in Java represent true or false conditions.
B
Boolean expressions evaluate to either true or false.
C
Boolean variables can be used in control flow to decide branches.
D
A boolean variable can have a value of 2.
Question Leaderboard
| Rank | |||||
|---|---|---|---|---|---|
| #1 | ngvandangthanh | 1 | 1 | - | 100 |
| #2 | michael.2103ll | 1 | 1 | - | 100 |
| #3 | isaact.taylor52 | 1 | 1 | 0m 49s | 51 |
| #4 | 1583974 | 1 | 1 | 2m 45s | -65 |
Items per page:
10
1 – 4 of 4
