Skip Site NavigationCarleton College: Home
 
 

This is a individual assignment.

Create a class called BackString with the following three methods:

  • public String iterBackwards(String text)
    This returns the String in reverse order, using iteration (for loop).
  • public String recurseBackwards(String text)
    This returns the String in reverse order, using recursion.
  • public static void main(String[] args)
    This is your main method. Put code in here to test both of your methods by displaying a String of your choice backwards, once using each method.

You may find the charAt() and length() methods for Strings useful.

Good luck!

Available from: Tuesday, May 15 2007, 04:20 PM
Due date: Monday, May 21 2007, 11:55 PM