It returns the character at the specified index. Specified index value should be between 0 to length() -1 both inclusive. It throws IndexOutOfBoundsException if index<0||>= length of String.
Compares the string with the specified string and returns true if both matches else false.
It works same as equals method but it doesn't consider the case while comparing strings. It does a case insensitive comparison.
This method compares the two strings based on the Unicode value of each character in the strings.
Same as CompareTo method however it ignores the case during comparison.
It checks whether the substring (starting from the specified offset index) is having the specified prefix or not.
It tests whether the string is having specified prefix, if yes then it returns true else false.
Checks whether the string ends with the specified suffix.
It returns the hash code of the string.
Returns the index of first occurrence of the specified character ch in the string.
Same as indexOf method however it starts searching in the string from the specified fromIndex.
It returns the last occurrence of the character ch in the string.
Same as lastIndexOf(int ch) method, it starts search from fromIndex.
This method returns the index of first occurrence of specified substring str.
Returns the index of last occurrence of string str.
It returns the substring of the string. The substring starts with the character at the specified index.
Returns the substring. The substring starts with character at beginIndex and ends with the character at endIndex.
Concatenates the specified string “str” at the end of the string.
It returns the new updated string after changing all the occurrences of oldChar with the newChar.
It checks whether the string contains the specified sequence of char values. If yes then it returns true else false. It throws NullPointerException of ‘s’ is null.
Converts the string to upper case string using the rules defined by specified locale.
Equivalent to toUpperCase(Locale.getDefault()).
This method searches the specified string in the memory pool and if it is found then it returns the reference of it, else it allocates the memory space to the specified string and assign the reference to it.
This method returns true if the given string has 0 length. If the length of the specified Java String is non-zero then it returns false.
This method joins the given strings using the specified delimiter and returns the concatenated Java String
It replaces the first occurrence of substring that fits the given regular expression “regex” with the specified replacement string.
It replaces all the occurrences of substrings that fits the regular expression regex with the replacement string.
It splits the string and returns the array of substrings that matches the given regular expression. limit is a result threshold here.
Same as split(String regex, int limit) method however it does not have any threshold limit.
It converts the string to lower case string using the rules defined by given locale.
This method returns a formatted java String
Equivalent to toLowerCase(Locale. getDefault()).
Returns the substring after omitting leading and trailing white spaces from the original string.
Converts the string to a character array.
It returns a string that contains the characters of the specified character array.
Same as above method with two extra arguments – initial offset of subarray and length of subarray.
It copies the characters of src array to the dest array. Only the specified range is being copied(srcBegin to srcEnd) to the dest subarray(starting fromdestBegin).
This method returns a string representation of passed arguments such as int, long, float, double, char and char array.
It compares the string to the specified string buffer.
It compares the substring of input to the substring of specified string.
Another variation of regionMatches method with the extra boolean argument to specify whether the comparison is case sensitive or case insensitive.
It converts the String into sequence of bytes using the specified charset encoding and returns the array of resulted bytes.
This method is similar to the above method it just uses the default charset encoding for converting the string into sequence of bytes.
It returns the length of a String.
It checks whether the String is matching with the specified regular expression regex.
It is similar to the charAt method however it returns the Unicode code point value of specified index rather than the character itself.