Multiple choice

Which of the following values in compareTo() method of String class is used to state that the invoking string is greater than the string passed as argument?

  1. Less than zero

  2. Zero

  3. Greater than zero

  4. Not equal to zero

  5. indexOf()

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

This value in compareTo() method of String class is used to state that the invoking string is greater than the string passed as argument.