Is there a neater way for getting the number of digits in an int than this method?
int numDigits = String.valueOf(1000).length();
A really simple solution:
public int numLength(int n) { for (int length = 1; n % Math.pow(10, length) != n; length++) {} return length; }