constant string operations come in two flavorsthose that modify the string they act on and those that simply return information about the string without actually modifying it java makes this distinction precise by defining the string class to represent immutable stringswhich cannot be modifiedand the stringbuffer class to represent mutable stringswhich can be modified the java string class the main operations of the java string class are listed belowlength()return the lengthnof charat( )return the character at index in startswith( )determine if is prefix of endswith( )determine if is suffix of substring( , )return the substring [ ,jconcat( )return the concatenation of and qthat iss+ equals( )determine if is equal to indexof( )if is substring of sreturn the index of the beginning of the first occurrence of in selse return - this collection forms the typical operations for immutable strings