Which one is a valid declaration of a boolean?
A. boolean b1 = 1;
B. boolean b2 = ‘false’;
C. boolean b3 = false;
D. boolean b4 = ‘true’
Answer:C
Which one is a valid declaration of a boolean?
A. boolean b1 = 1; B. boolean b2 = ‘false’; C. boolean b3 = false; D. boolean b4 = ‘true’
Explanation: Boolean can only be assigned true or false literals.