import java.util.Scanner;
public class Test {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String str = sc.nextLine();
StringBuffer buffer = new StringBuffer(str);//创建StringBuffer对象
buffer.reverse();//反转
// System.out.println(buffer);
String str1 = new String(buffer);//将StringBuffer转换成String类型
System.out.println(str1);
}
}
|
|