Is there a neater way for getting the number of digits in an int than this method?
int numDigits = String.valueOf(1000).length();
Try converting the int to a string and then get the length of the string. That should get the length of the int.
public static int intLength(int num){ String n = Integer.toString(num); int newNum = n.length(); return newNum; }