Java Programming - Language Fundamentals - Discussion
Discussion Forum : Language Fundamentals - General Questions (Q.No. 11)
11.
Which one is a valid declaration of a boolean?
Answer: Option
Explanation:
A boolean can only be assigned the literal true or false.
Discussion:
15 comments Page 2 of 2.
Kirti said:
1 decade ago
Option D is not correct because Boolean is not correct it must be Boolean.
Akanksha said:
1 decade ago
Option B is have single quotes which is for a string so its wrong.
Option D is compilation error.
Option E is also compilation error as no is not any keyword.
Option D is compilation error.
Option E is also compilation error as no is not any keyword.
Sweety said:
1 decade ago
Boolean always returns true or false. So option A can't be !
Saurav said:
1 decade ago
Why is option A not correct?
Vineet said:
1 decade ago
Please also define the resion of other option, why is not corret.
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers