// ReverseIntRecurse3 - method returns a string that is the reverse of an integer import java.util.Scanner; public class ReverseStringRecurse { public static void main(String[] args) { String x; Scanner input = new Scanner(System.in); System.out.print("Please enter a string: "); x = input.next(); System.out.println(reverse(x)); } public static String reverse(String x) { if (x.length() == 1) { return x; } else { return (reverse(x.substring(1)) + x.charAt(0)); } } }