The following methods are some of the more commonly used
methods in the String
Class.
- charAt() Returns the character located at the specified index
- concat() Appends one String to the end of another ( "+" also works)
- equalsIgnoreCase() Determines the equality of two Strings, ignoring case
- length() Returns the number of characters in a String
- replace() Replaces occurrences of a character with a new character
- substring() Returns a part of a String
- toLowerCase() Returns a String with uppercase characters converted
- toString() Returns the value of a String
- toUpperCase() Returns a String with lowercase characters converted
- trim() Removes whitespace from the ends of a String
No comments:
Post a Comment