package com.mvc.core;
public class a {
public static void main(String[] args) {
String str = "abc";
// 第一种方法
StringBuffer sb = new StringBuffer(str);
sb.reverse();
str = sb.toString();
System.out.println(str);
// 第二种方法
for(int a = str.length() -1 ; a >= 0; a--) {
System.out.print(str.charAt(a));
}
}
}