[https://github.com/mengli/leetcode/blob/master/PalindromeNumber.java#L26](https://github.com/mengli/leetcode/blob/master/PalindromeNumber.java#L26) Your output is error when the input is **1021** or **10021**. we should change it to: ``` java while(x != 0) { ```