How do you get the number of digit of an integer without using any String, concatenation, type casting; in java? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

How do you get the number of digit of an integer without using any String, concatenation, type casting; in java?

25th Jan 2021, 6:28 AM
Ravier Konan
Ravier Konan - avatar
2 Answers
+ 3
With integer division: Count how often you can divide by 10 until you reach 0
25th Jan 2021, 7:13 AM
Benjamin Jürgens
Benjamin Jürgens - avatar
+ 1
Post your code which you have tried
25th Jan 2021, 8:39 AM
Atul [Inactive]