Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

java check how many digits in a number

int n = 1000;
int length = (int)(Math.log10(n)+1);

//NB: only valid for n > 0
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #java #check #digits #number
ADD COMMENT
Topic
Name
1+5 =