日期:2014-05-18 浏览次数:20701 次
public static void main(String[] args) {
// TODO Auto-generated method stub
if (reverse("aba")) {
System.out.print("字符串对应");
}else {
System.out.print("字符串不对应");
}
}
public static boolean reverse(String str) {
String reStr = new StringBuffer(str).reverse().toString();
return reStr.equals(str);
}