A

Admin • 831.35K Points
Coach

Q. What is returned by TreeSet's `first()` method?

  • (A) Null
  • (B) The highest element
  • (C) The smallest element
  • (D) Random element
  • Correct Answer - Option(C)
  • Views: 21
  • Filed under category Java
  • Hashtags: Java Set

Explanation by: Admin
The `first()` method returns the smallest element in a TreeSet.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.