A

Admin • 828.03K Points
Coach

Q. Given `Comparator<String> comp = String::compareToIgnoreCase;`, what does the method reference resolve to?

  • (A) Comparator comparing case-sensitive strings
  • (B) Comparator comparing case-insensitive strings
  • (C) Sorting strings by length
  • (D) It won't compile

Explanation by: Admin
String::compareToIgnoreCase is a method reference for case-insensitive comparison.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.