import java.util.*;
public class Solution {
/**
*
* @param x int整型
* @return bool布尔型
*/
public boolean isPalindrome (int x) {
// write code here
String s1=Integer.toUnsignedString(x);//转为String
if((new StringBuffer(s1).reverse()).toString().equals(s1)){//判断String的逆序(reverse)是否与String相等
return true;
}else{
return false;
}
}
}
京公网安备 11010502036488号