Language Fundamentals

Q1: Which one is a valid declaration of a boolean?

A boolean b5 = no;

B boolean b4 = Boolean.false();

C boolean b3 = false;

D boolean b2 = 'false';

E boolean b1 = 0;

ANS:C - boolean b3 = false;

A boolean can only be assigned the literal true or false.



img not found
img

For help Students Orientation
Mcqs Questions

One stop destination for examination, preparation, recruitment, and more. Specially designed online test to solve all your preparation worries. Go wherever you want to and practice whenever you want, using the online test platform.