Courseiva

1Z0-829 Practice Question: Handling Date, Time, Text, Numeric and Boolean Values

Which THREE statements are true about the Boolean class? (Choose three.)

⚠ Common exam trap

A common mix-up: candidates confuse the `Boolean` wrapper class's possible reference values (including `null`) with the logical values of the `boolean` primitive, leading them to incorrectly select option E.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

The parseBoolean(String) method returns false if the string is null or not equal to "true" (case-insensitive).

The `Boolean.parseBoolean(String)` method returns `false` for any input that is not exactly equal to `"true"` (case-insensitive), including `null`. This is specified in the Java API documentation and is a common way to safely parse boolean strings without throwing a NullPointerException.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • The parseBoolean(String) method returns false if the string is null or not equal to "true" (case-insensitive).

    Why this is correct

    parseBoolean returns false for non-matching strings.

  • The Boolean constructor is the preferred way to create a Boolean object.

    Why it's wrong here

    Boolean constructor is deprecated; valueOf is preferred.

  • Boolean.TRUE and Boolean.FALSE are static constants.

    Why this is correct

    Yes, they are predefined static final instances.

  • The valueOf(String) method returns Boolean.TRUE or Boolean.FALSE without creating a new instance.

    Why this is correct

    valueOf returns cached constants.

  • Boolean has three possible values: true, false, and null.

    Why it's wrong here

    Boolean is an object wrapper; it can be null, but the boolean primitive has only two values.

About these practice questions

One of 513 original 1Z0-829 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This 1Z0-829 practice question is part of Courseiva's free Oracle certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the 1Z0-829 exam.