I want to split my int value into digits. eg if the no. is 542, the result should be 5,4,2.
I have 2 options. 1) Convert int into String & then by using getCharA
Use the mod 10 rule...
List digits = new ArrayList(); while (n > 0) { digits.add(n%10); n/=10; }