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 getCharArray(), i can have separate characters & then i will convert them back into int values.
2) Convert int into String, without converting it into char array, iterate it & get all digits.
Is there any other way to solve the problem. If not, which of the option will be fast?