String/character Methods Flashcards

1
Q

compareTo(String)

A

Compares to strings lexicographically by returning a negative #, positive # or zero
RETURN TYPE int

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

equals(Object)

A

Compares this string to the specified object

RETURN TYPE int

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

charAt(int)

A

Returns the CHAR value at the specified index

RETURN TYPE char

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

indexOf(String)

A

Returns the index within this string of the first occurrence of the specified substring
RETURN TYPE int

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

indexOf(String, int)

A

Returns the index within this string of the first occurrence of the specified substring, starting at the specified index
RETURN TYPE int

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

length( )

A

Returns the number of characters in this string

RETURN TYPE int

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

substring(int)

A

Returns a new string that is a substring of this string

RETURN TYPE String

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

substring(int, int)

A

Returns a substring between the specified offsets of the current string
RETURN TYPE String

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

toLowerCase( )

A

Converts the entire string to lowercase

RETURN TYPE String

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

toString( )

A
This object (which is already a string!) is itself returned
RETURN TYPE String
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

toUpperCase( )

A

Converts the entire string to uppercase

RETURN TYPE String

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

valueOf(double)
valueOf(float)
…(int)
…(Object)

A

Returns the string representation of the (double, float, int, Object) argument
RETURN TYPE static String

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

compareTo(Character)

A

Compares two Character objects numerically

RETURN TYPE int

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

isLetter(char)

A

Determines if the specified character is a letter

RETURN TYPE static boolean

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