A

Admin • 833.24K Points
Coach

Q. What will "hello".compareTo("hello") return?

  • (A) -1
  • (B) 0
  • (C) 1
  • (D) true

Explanation by: Admin

compareTo() returns 0 when strings are exactly the same.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.