public static void reverseInteger () {//pass
        int x = -321;
        int isNeg = 0;
        int x_new = 0;
        if (x < 0) {
            x = -x;
            isNeg = 1;
        }
        while (x != 0) {
            int m = x % 10;
            x_new = x_new * 10;
            x_new += m;
            x = x / 10;
        }
        if (isNeg == 1) {
            x_new = -x_new;
        }
        System.out.println(x_new);
    }