import java.util.Scanner;
public class TestOne {
static Scanner san = new Scanner(System.in);
public static void main(String[] args) {
System.out.print("输入任意字符串: ");
StringBuffer sb = new StringBuffer(san.nextLine());
System.out.print("倒序输出为: " + sb.reverse());
}
}
String str = "I am a student";
str = new StringBuffer(str).reverse().toString();
System.out.println(str);