how to revers a string in java code example Example: java string reverse String rev = new StringBuilder("Your String").reverse().toString();