|
-
How do I determine the length of an integer?
Hello,
I have an int variable and I want to determine its length (i.e. I want the int to be of 4 characters).
I understand how to determine the length of a String, i.e.
------------------------------------
String text
int temptext = text.length();
------------------------------------
Can this be done similar with an int variable or would I have to convert the int to a String (and then determine its length) and then back to an int?
Thanks for any advice :-)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks