Java判断字符串是否回文

new StringBuilder(str).reverse().toString().equals(str)



你可能感兴趣的:(算法)