思路:将原数反转,得到的数与原数比较,若相等则为回文 public class Solution { public boolean isPalindrome (int x) { // write code here //特殊情况:负数 if (x<0) return false; int y = x; int num = 0; int z = 0; //获取位数 while (y!=0) { y /= 10; num++; } y = x; //反转原数 int t1 = 1, t2 = 1; for (int i = 1; i<num; i++) t1 *= 10; for (i...