Menu
Topics Index
...
`

Session 15 has these questions


Boolean Literals2842

Which of the following declaration is correct?
A. bool b;
B. Bool b;
C. boolean b;
D. None of the above



Boolean Literals2845

Which of the following initialization is incorrect?
A. boolean b = false;
B. boolean a = true;
C. boolean b = 0;
D. boolean a = true;
boolean b = a;



String Literal2844

Which of the following initialization is incorrect?
A. String str = "Java "
+ "Learning "
+ "School";
B. String str = "Java
Learning
School";
C. String result = "0.01";
D. String result = "0.01" + "Hai";



String Literal

Which of the following initialization is correct?
A. String str = 'Hai hello how are you';
B. String str;
str = "Hai hello how are you";
C. String str = Hai hello how are you;
D. String str;
str = 'Hai hello how are you';



© meritcampus 2019

All Rights Reserved.

Open In App