字符逆序
字符逆序
http://www.nowcoder.com/questionTerminal/cc57022cb4194697ac30bcb566aeb47b
StringBuilder.reverse方法
import java.util.*;
public class Main {
private String reverse(String str) {
StringBuilder res = new StringBuilder(str);
return res.reverse().toString();
}
public Main() {
Scanner in = new Scanner(System.in);
while (in.hasNextLine()) {
String str = in.nextLine();
String res = reverse(str);
System.out.println(res);
}
}
public static void main(String[] args)
{
Main solution = new Main();
}
} 