d2jsp
Log InRegister
d2jsp Forums > Off-Topic > Computers & IT > Programming & Development > Java Help
Prev12
Add Reply New Topic New Poll
Member
Posts: 6,604
Joined: May 29 2013
Gold: 2.72
Oct 29 2014 10:28pm
Quote (Minkomonster @ Oct 30 2014 12:23am)
No, its an integer. The String I was refering to is the the return of String.valueOf(num), which would return "100". Calling the length method on this string returns an integer representing the length of the string.

To be more clear

Code
int num = 100;
String stringifiedNum = String.valueOf(num);
int numOfDigits = stringifiedNum.length(); //numOfDigits is 3 because the length of the String is 3


Yes, I figured, that's why I edited my post up there right after xd. Hoping you didn't see it.
Member
Posts: 1,995
Joined: Jun 28 2006
Gold: 7.41
Oct 29 2014 10:32pm
Quote (Jibbosh @ Oct 29 2014 11:28pm)
Yes, I figured, that's why I edited my post up there right after xd. Hoping you didn't see it.


Go Back To Programming & Development Topic List
Prev12
Add Reply New Topic New Poll