Is there a neater way for getting the number of digits in an int than this method?
int numDigits = String.valueOf(1000).length();
int num = 02300; int count = 0; while(num>0){ if(num == 0) break; num=num/10; count++; } System.out.println(count);