ReverseString Program
Description
The program inputs a string and uses a recursive method to print the string in reverse order.Associated Concepts:
Recursion
Algorithm:
main method:
printReverse method definition:
Input a string
Call printReverse method with the input string as the argument
Call printReverse method with the input string as the argument
printReverse method definition:
If the input string has only one character, print it.
Otherwise
Otherwise
Print the last character
Call printReverse() method recursively with the argument of the substring from 0 to the second last character
Call printReverse() method recursively with the argument of the substring from 0 to the second last character
Source Code

Sample Run
