leetcode 回文数

class Solution {
    public boolean isPalindrome(int x) {
        if(new StringBuffer(""+x).reverse().toString().equals(new StringBuffer(""+x).toString())){
            return true;
        }
        return false;

    }
}

你可能感兴趣的:(leetcode 回文数)