Last Updated: February 25, 2016
·
959
· luke_ar

How to reverse a String in Java

Simple enough, using Java API's goods :)

public String reverse(String s) {
    return new StringBuffer(s).reverse().toString();
}