enter the string to reverse code example
Example 1: java string reverse
String rev = new StringBuilder("Your String").reverse().toString();
Example 2: string reverse in java
String str = "Hello";
String reverse(String str){
StringBuilder sb = new StringBuilder();
sb.append(str);
sb.reverse();
return sb.toString();
}