public boolean isPalindrome(int x) {
if(x<0)
return false;
String s = Integer.toString(x);
boolean check = true;
char[] arr = s.toCharArray();
for(int i=0; i<arr.length/2;i++){
if(arr[i]==arr[arr.length-1-i]){
check=true;}
else{
check =false;
break;
}
}return check;
}