Results 1 to 2 of 2
Thread: Add zeroes to int
- 03-01-2011, 04:09 PM #1
Member
- Join Date
- Feb 2011
- Posts
- 84
- Rep Power
- 0
Add zeroes to int
Hi,
I have an int value Extension.It should be 4 diguts long always.Even if the data via the procedure comes 45 .It should treat it as 0045.
I cannot convert it to string as my setter method is taking int as an argument.
I get the value of extension from database as
extension as
int extension=rs.getint("extension")
obj.setExtension(int)
This extension should add zeroes if it is not 4 digits.
Please help I am stuck up.
Thanks,
-
There's nothing in this question that deals with advanced Java. Since it is a multiposted question, I'm closing it and will fold the answers in the original poster's other thread. Original poster, please do not multipost questions.
Similar Threads
-
How to add leading zeroes to int
By pink123 in forum New To JavaReplies: 11Last Post: 03-01-2011, 07:18 PM -
help with saving bleeding zeroes.
By SteroidalPsycho in forum New To JavaReplies: 6Last Post: 04-14-2010, 08:55 AM -
Shift Off Trailing Zeroes
By nwboy74 in forum New To JavaReplies: 5Last Post: 02-25-2010, 07:56 AM


LinkBack URL
About LinkBacks

Bookmarks