I have \"Hello World\" kept in a String variable named hi.
\"Hello World\"
hi
I need to print it, but reversed.
How can I do this? I understand there
public static String reverseIt(String source) { int i, len = source.length(); StringBuilder dest = new StringBuilder(len); for (i = (len - 1); i >= 0; i--){ dest.append(source.charAt(i)); } return dest.toString(); }
http://www.java2s.com/Code/Java/Language-Basics/ReverseStringTest.htm