How to iterate digits of integer? for example sum of digits here, it works, but is any way to right way?
int sum = 0; String numtostr = num.toString()