public int reverseInteger(int number) {
        int i=0, k=0;
        while(number>0){
            k=number%10;
            number=number/10;
            i=i*10+k;
        }
        return i;
    }
Copy the code