Chapter 4 - Comparing Strings Flashcards

1
Q

equals(s1)

A

returns true if this string is equal to s1

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

equalsIgnoreCase(s1)

A

returns true if this string is equal to string s1: it is case sensitive

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

startsWith(prefix)

A

returns true if this string starts with the specified prefix

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

comparetoIgnoreCase(s1)

A

same as compareTo except that the comparison is case sensitive

How well did you know this?
1
Not at all
2
3
4
5
Perfectly