import java.io.*; //import the IO package. public class Characters { public static void main(String [] args) throws IOException { BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in)); System.out.println("Enter String:"); String words = stdin.readLine(); // get user input for(int i=words.length()-1;i>-1;i--) { System.out.println(words.charAt(i)); // output user input in reverse one letter at a time. } } }