These two methods are overloaded in several different ways. In all cases, the methods return the index at which the character or substring was found, or –1 on failure.
These two methods are overloaded in several different ways. In all cases, the methods return the index at which the character or substring was found, or –1 on failure.
This method replaces the characters in a substring of this StringBuffer with characters in the specified String.
The delete( ) method deletes a sequence of characters from the invoking object.
This example shows how to reverse the content of the StringBuffer using reverse method of Java StringBuffer class.
The capacity is the amount of storage available for newly inserted characters, beyond which an allocation will occur.
Obvious length is related to number of characters in string
The method toLowerCase( ) converts all the characters in a string from uppercase to lowercase. The toUpperCase( ) method converts all the characters in a string from lowercase to uppercase.