Method Names Flashcards

(11 cards)

1
Q

What does name.substring(int start, int end) do?

A

Returns a copy of the string between the start (inclusive) and end (exclusive) index

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

What does name.substring(int start) do?

A

Returns a copy of the string starting from start up until the end.

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

What does name.equals(Object another) do?

A

Returns true/false based off of content

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

What does name.length() do?

A

Returns the number of characters in the string including spaces, tabs, and line breaks.

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

What does name.compareTo(String another) do?

A

It compares two strings using <, >, and =.

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

What does name.charAt(int index) do?

A

It returns the character at the index position.

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

What does name.indexOf(“substr”) do?

A

It returns the index of the first occurrence of the specified substring. If there is no occurrence, -1 is returned.

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

What does String.valueOf() do?

A

Converts any int into String.

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

What does Integer.parseInt(“454”) do?

A

Converts the string argument into an integer.

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

What does Math.pow(x, y) do?

A

Returns x^y

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

What does Arrays.toString(arrayName) do?

A

Converts an array to string.

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