DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
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
COMMENT
Name
1+5 =
Submit