split int value into seperate digits
<p>I want to split my int value into digits. eg if the no. is 542, the result should be 5,4,2.</p>

<p>I have 2 options.
1) Convert int into String &amp; then by using getCharArray(), i can have separate characters &amp; then i will convert them back into int values.</p>

<p>2) Convert int into String, without converting it into char array, iterate it &amp; get all digits.</p>

<p>Is there any other way to solve the problem. If not, which of the option will be fast?</p>
