A

Admin • 828.03K Points
Coach

Q. In the real-world, which method reference helps when sorting a list of strings alphabetically?

  • (A) String::length
  • (B) String::compareTo
  • (C) String::toLowerCase
  • (D) String::isEmpty

Explanation by: Admin
`String::compareTo` is used for natural ordering of strings.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.