String Methods - Java

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/9

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 11:04 PM on 9/27/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

10 Terms

1
New cards

isEmpty()

Returns true if the string is empty, otherwise false.

2
New cards

toUpperCase()

Returns a new string in uppercase.

3
New cards

toLowerCase()

Returns a new string in lowercase.

4
New cards

startsWith(prefix)

Returns true if the string starts with the given string prefix, otherwise false.

5
New cards

endsWith(suffix)

Returns true if the string ends with the given string suffix, otherwise false.

6
New cards

contains(…)

Returns true if the string contains the given string or character.

7
New cards

substring(beginIndex, endIndex)

Returns a substring of the string in the range: beginIndex to endIndex - 1.

8
New cards

replace(old, new)

Returns a new string obtained by replacing all occurrences of old with new (chars or strings).

9
New cards

replaceAll(old, new)

Returns a new string obtained by replacing all occurrences of old with new, where old is a regular expression.

10
New cards

trim()

Returns a copy of the string with leading and trailing whitespace omitted (spaces, tabs, newlines, etc.).