Is there a neater way for getting the number of digits in an int than this method?

int numDigits = String.valueOf(1000).length();

26 Answers
26

Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *