UNB/ CS/ David Bremner/ teaching/ java/ Reverse.java
public class Reverse
{  public static void main(String[] args)
   {  ConsoleReader console = new ConsoleReader(System.in);  
      System.out.println("Please enter a string:");
      String s = console.readLine();
      String r = "";
      for (int i = 0; i < s.length(); i++)
      {  char ch = s.charAt(i);
         r = ch + r; // add ch in front
      }      
      System.out.println(s + " reversed is " + r);
   }
}