1.

Which of these values can a boolean variable contain?(a) True & False(b) 0 & 1(c) Any integer value(d) trueThe question was asked during an interview.My doubt stems from Character and Boolean Data Types topic in section Data Types, Variables and Arrays of Java

Answer»

Right option is (a) TRUE & False

To elaborate: BOOLEAN variable can contain only ONE of TWO possible values, true and false.



Discussion

No Comment Found

Related InterviewSolutions