methods Flashcards
.equals()
Checks if the values of two objects are equivalent.
.compareTo()
Compares two Strings alphabetically, returns 0 if Strings are identical, negative if left value comes first, positive if right value comes first.
.toUppercase()
Returns all the characters in a string capitalized.
.toLowercase()
Returns all the characters in a string as lowercase letters.
.length()
Returns the number of characters a string contains.
.substring(x)
Returns a substring of the String that begins at index “x” and goes to the end.
substring(x, y)
Returns a substring of the String that begins at index “x” and goes to index “y.”
.indexOf(String x)
Returns the index location that the substring “x” first appears in a string.