A

Admin • 833.24K Points
Coach

Q. Which of these is TRUE for HashSet?

  • (A) It is thread-safe
  • (B) It preserves insertion order
  • (C) It allows multiple null values
  • (D) It allows constant-time operations
  • Correct Answer - Option(D)
  • Views: 28
  • Filed under category Java
  • Hashtags: Java Set

Explanation by: Admin

HashSet allows constant-time performance for basic operations like add, remove, and contains.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.