STRINGS
String are used to store text within double quotes.
Generally ,String is a collection of characters .But in java,string is an object that represents a sequence of character.
Example:
String greeting = ''Hello World'';
STRING CLASS METHODS:
string method |
- Length[]- It returns string length.
- toLowerCase[]- It returns a string in lowercase using specified locale.
- toUpperCase[]- It returns a string in uppercase using specified locale.
- Trim[]- It removes beginning and ending spaces of this string.
- Concat[]- It concatenates the specified string.
- Equals[]- It checks the equality of string within the given object.
- Replace[]- It replace all occurences of the specified curve value.
- CharAt()- It returns char values for the particular index.
- CompareTo()- It compares another string, it doesn't check case.
- Substring(index)- It returns the specified substring index.
- Valueof[]- It converts given type into string, it is an overloaded method.
- Boolean[]- It returns true or false after matching the sequence of char values.
- Indexof[]- It returns the specified char value index starting with given index.
STRING BUFFERS METHODS:
string buffer |