Courseiva
Question 356 of 513
Working with Arrays and CollectionseasyMultiple SelectObjective-mapped

1Z0-829 Working with Arrays and Collections Practice Question

Which TWO statements about HashMap are true? (Select two.)

⚠ Common exam trap

Many exam-takers confuse HashMap with TreeMap (which does not allow null keys) or with ConcurrentHashMap (which does not allow null keys or values), and may incorrectly assume HashMap is thread-safe because it is widely used in single-threaded contexts.

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

It allows null values.

HashMap allows null values; you can store null as a value for any key, including null keys. This is explicitly permitted by the HashMap specification, which does not restrict value types.

Answer analysis

Option-by-option breakdown

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

  • It allows null values.

    Why this is correct

    HashMap allows null values for any key.

  • It uses red-black trees for collision resolution.

    Why it's wrong here

    HashMap uses linked lists and trees only when collisions exceed threshold (TREEIFY_THRESHOLD), but it's not always trees.

  • It guarantees insertion order.

    Why it's wrong here

    LinkedHashMap guarantees insertion order; HashMap does not.

  • It allows null keys.

    Why this is correct

    HashMap permits one null key and multiple null values.

  • It is thread-safe.

    Why it's wrong here

    HashMap is not thread-safe; ConcurrentHashMap or synchronized map is needed for concurrent access.

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Last reviewed: Jun 25, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

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.