MCQ
Which of the following method does return true if invoking string is same as str ?
  • A
    booleanequalsIgnoreCase (String str)
  • boolean equals(String str)
  • C
    intcompareTo(String str)
  • D
    intcompareToIgnoreCase(String str)

Answer

Correct option: B.
boolean equals(String str)
B

Need a full question paper?

Generate a complete, print-ready paper with questions like this in minutes — across 16+ boards, with answer keys.

Start Generating Free