Home / Report Question

Q. Which of the following methods is used to compare two strings for equality in Java?
  • A. equals()
  • B. compareTo()
  • C. equalsIgnoreCase()
  • D. compare()