Chapter 4 - Comparing Strings Flashcards
1
Q
equals(s1)
A
returns true if this string is equal to s1
2
Q
equalsIgnoreCase(s1)
A
returns true if this string is equal to string s1: it is case sensitive
3
Q
compareTo(s1)
A
returns an integer greater than 0, equal to 0, or less than 0 to indicatee whether this string is greater than, equal to, or less than -1
4
Q
startsWith(prefix)
A
returns true if this string starts with the specified prefix
5
Q
comparetoIgnoreCase(s1)
A
same as compareTo except that the comparison is case sensitive