A

Admin • 828.03K Points
Coach

Q. What is the default behavior of `sorted()`?

  • (A) Sorts by hash code
  • (B) Sorts using natural order
  • (C) Sorts by toString()
  • (D) Sorts by insertion order

Explanation by: Admin
`sorted()` without arguments sorts elements in their natural order (Comparable).

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.