int compareTo(String) – compares the current string with the specified string object lexicographically and returns the difference of the ASCII codes of the first dissimilar character. If the strings are equal, it returns 0.

int compareToIgnoreCase(String) – compares the current string with the specified string object lexicographically ignoring case consideration and returns the difference of the ASCII codes of the first dissimilar character. If the strings are equal, it returns 0.

int indexOf(char/String) – returns the index of the first occurrence of the specified character /string in the current string object. If the character/String is not present, it returns -1.

int indexOf(char/String, int) – returns the index of the specified character/string in the current string object starting from the specified index. If the character/string is not present, it returns -1.

int lastIndexOf(char/String) – returns the index of the last occurrence of the specified character/string in the current string object. If the character/string is not present, it returns -1.

int lastIndexOf(char/String, int) – returns the index of the last occurrence of the specified character/string in the current string object starting from the specified index. If the character/string is not present, it returns -1.

int length( ) – returns the number of characters in the current string.

void replace(char oldchar, char newchar) – replaces all occurrences of oldchar in the current string with newchar.

String substring(int startindex, int endindex) – extracts and returns characters from startindex to endindex -1 from the current string object.

toLowerCase( ) – converts the current string object to lower case.

toUpperCase( ) – converts the current string object to upper case.

trim( ) – removes the blank spaces from both ends of the current string object.