日期:2014-05-20 浏览次数:20763 次
public static void main(String[] args) { Scanner scan = new Scanner(System.in); //从控制台读取 String scanReverse = new StringBuilder(scan.next()).reverse().toString();//scan.next()获取输入字符串,StringBuilder自带有reverse方法 System.out.println(scanReverse); }