How to reverse String in Java?


StringBuffer class of the java.lang package provides reverse() method. This method returns reverse sequence of the characters in the current String. Using this method you can reverse a string in Java.

Updated on: 30-Jul-2019

205 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements