public static String reverse(final String input){
  final char[] charInput=input.toCharArray();
  reverse(charInput,0,charInput.length);
  return new String(charInput);
}

public static String reverse ( final String input ) { final char [ ] charInput = input . toCharArray ( ) ; reverse ( charInput , 0 , charInput . length ) ; return new String ( charInput ) ; }
reverses the given input string
