package Recursive;
import java.util.Scanner;
public class Exercise18_09 {
public static void main(String[] args) {
System.out.print("Enter a string: ");
String value = new Scanner(System.in).nextLine();
System.out.print("The reversion of " + value + " is ");
reverseDisplay(value);
}
/** 逆序输出字符 */
public static void reverseDisplay(String value) {
if (value.length() > 0) {
System.out.print(value.charAt(value.length() - 1));
reverseDisplay(value.substring(0, value.length()-1));
}
}
}