题解 | #数字颠倒#
数字颠倒
http://www.nowcoder.com/practice/ae809795fca34687a48b172186e3dafe
字符串反转reverse()方法
import java.util.*;
public class Main {public static void main(String [] a) {
Scanner sc = new Scanner(System.in);
String s = sc.nextLine();
//StringBuffer s1 = new StringBuffer(s).reverse();
//System.out.println(s1);
System.out.println(new StringBuffer(s).reverse());
}
}