P

Pooja • 4.41K Points
Extraordinary

Q. Which of the following is the correct way to compare two strings in a case-insensitive manner in Java?

  • (A) str1.equals(str2)
  • (B) str1.compareToIgnoreCase(str2)
  • (C) str1.equalsIgnoreCase(str2)
  • (D) str1.compare(str2)
  • Correct Answer - Option(C)
  • Views: 20
  • Filed under category JAVA

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.


Question analytics