题解 | #字符逆序#--使用SB的reverse()方法
字符逆序
https://www.nowcoder.com/practice/cc57022cb4194697ac30bcb566aeb47b
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
List<String> result = new ArrayList<>();
// 使用StringBulider/StringBuffer的reverse()方法
while (in.hasNextLine()) {
StringBuilder sb = new StringBuilder(in.nextLine());
sb.reverse();
System.out.println(sb.toString());
}
}
}


