sorry for bad english

```
public int reverse(int x) {
int result = 0, temp = 0;
while (Math.abs(x) > 0) {
result = result * 10 + x % 10;
if (result / 10 != temp) {
return 0;
}
temp = result;
x /= 10;
}
return result;
}
```