Moderate

In Java, the word true is ___________________?

Correct answer: A. A Boolean literal

  • A. A Boolean literal
  • B. A Java keyword
  • C. Same as value 0
  • D. Same as value 1

Explanation

`true` is a Boolean literal in Java, alongside `false`; it is not a keyword and Java does not treat it as numeric 0 or 1.

Last updated

Practise Software Design and Architecture

493 free Software Design and Architecture MCQs from Software Engineering, each with the correct answer and an explanation. Unlimited attempts, no account needed.

Exams that ask Software Engineering questions like this

Software Engineering is on this paper prepared for on TestUstad, and all of them draw the same bank, so this question is worth knowing for it.

Related questions