字符串反转,关键是晓得StringBuilder.reverse方法

import java.util.*;
public class Main{
    public static void main(String[] args){
        Scanner sc=new Scanner(System.in);
        String str=sc.nextLine();
        StringBuilder sb=new StringBuilder(str);
        System.out.print(sb.reverse());
    }
}