code: private static String reverseString(String source) {
      int i;
      int len = source.length();
      StringBuffer dest = new StringBuffer();
  
      for (i = (len - 1); i >= 0; i--) {
        dest.append(source.charAt(i));
      }
      return dest.toString();
    }
docs: method to reverse a String
  
  @param source given string to reverse
  @return reversed String