题目:Determine whether an integer is a palindrome. Do this without extra space.
public class Solution {
public boolean isPalindrome(int x) {
if(x<0)
return false;
int s=0,t=0;
int k=x;
while(x!=0)
{
t = x%10;
s = 10*s+t;
x = x/10;
}
System.out.println(s);
if(s==k)
return true;
else
return false;
}
}