class Solution {
public boolean isPalindrome(int x) {
if(x<0)
return false;
int head=0;
int tmp=x;
while(tmp!=0)
{
head =head*10+tmp%10;
tmp/=10;
}
return (x==head);
}
}
x%10取个位数字。