67,515
社区成员
发帖
与我相关
我的任务
分享
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);
}