Which one is a valid declaration of a boolean?

Q & ACategory: JavaWhich one is a valid declaration of a boolean?
Admin Staff asked 5 years ago

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’

1 Answers
Admin Staff answered 5 years ago

c) boolean b3 = false;