java.lang.StringBuffer reverse()


public StringBuffer reverse()

Java Code Example :

This java example source code demonstrates the use of reverse() method of StringBuffer class. Initially the code assigns a string “” as initial contents of the string buffer. Then we use the reverse method to actually reverse the contents of the character sequence.

Sample Output :

Running the above example source code will give the following output

reverse() method example

reverse() method example

Suggested Reading List :

References :