import java.util.Scanner; public class Main { public static void main(String[] args) { //接受一个只包含小写字母的字符串,然后输出该字符串反转后的字符串。(字符串长度不超过1000 Scanner scanner = new Scanner(System.in); String num01 = scanner.nextLine(); if(num01.length()>1000) { System.out.println("输入长度超标"); }else { StringBuffer sb = new StringBuffer(num01); System.out.println(sb.reverse().toString()); } } }