I tried many times,that the spcial case 1534236469 couldn`t pass,finally,I change the sum parameter newNum from int to long and accepted.

Here is my AC code:

```
public static int reverse(int x){
long newNum=0,old=x;//*Notice* long,so that it can compare with MAX_Value
x=(x>0)?x:(0-x);
while(x!=0){
newNum*=10;
newNum+=x%10;
x/=10;
if(newNum>Integer.MAX_VALUE||newNum<Integer.MIN_VALUE)
return 0;
}
if(old>0)
return (int)newNum;
else if(old<0)
return (int)(0-newNum);
else
return 0;
}
```