private static boolean isPalindrome(int i) {
        String s = i + "";
        for (int j = 0; j < s.length() / 2; j++) {
            if(s.charAt(j) != s.charAt(s.length() - j - 1)) {
                return false;
            }
        }
        return true;
    }