方式一:
int num = 100; int[] ary = new int[(num+"").length()]; for(int i = ary.length-1;i>=0;i--){ ary[i] = num%10; num /= 10; } for(int i:ary){ System.out.println(i); }