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
This did the trick for me
public static void main(String[] args) { String text = "abcdefghijklmnopqrstuvwxyz"; for (int i = (text.length() - 1); i >= 0; i--) { System.out.print(text.charAt(i)); } }