class ReverseInt { public static void main(String[] args) { int num = 1234567890; int[] digits = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; int i = 0; while (num != 0) { digits[i++] = num % 10; num /= 10; } for (i = 0; i < digits.length; i++) System.out.print(digits[i]); } }