Strings Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

What is the a string terminated by?

A

Null Character.

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

What does length() do?

A

Used to return the length of a string.

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

What does toLowerCase() do?

A

Used to return string in lowercase.

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

What does toUpperCase() do?

A

Used to return string in uppercase.

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

What does contains() do?

A

Used to check the existence of another string.

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

What does endsWith() do?

A

Used to check if a string ends with a specific character.

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

What does index() do?

A

Used to check the index of a character in a string.

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

What does replace() do?

A

Used to replace a character in the original string.

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

What does substring() do?

A

Used to return a substring of the original string.

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

What does compareTo() do?

A

Compares an instance with a specified string and checks whether it follows in the same sort order as the specified string.

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

Explain the possible values of compareTo()?

A

Value is less than 0: Precedes order.
Value is greater than 0: Follows order.
Value is equal to 0: Equal in order.

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