Recursion

If recursion is new to you and you want a slower ramp-up, try writing the method public String recurseBackwards(String text), which should take a String as a parameter and return it backwards. It should, of course, do so recursively. You might want to try first writing public String iterBackwards(String text) which should do the same thing iteratively (with loops).

Another is to write a method called power(int a,int b) that is similar to Math.pow: it should take the number a to the b power. Assume that both numbers are positive integers. Don't use Math.pow, or you defeat the whole purpose of the exercise.

Other ideas are to write a recursive method to test if a String is a palindrome (the same forwards as backwards), or to take an array and determine the maximum value (but to do so recursively.)

Finally, if you want a bigger challenge, try to implement mergesort or quicksort (quicksort is a Comp Sci AB topic, ask if you want an explanation) without looking at sample code.