Can anybody help me here. I need to keep incrementing the integer in a loop and use the same integer as a string of 5 char. For example if I am incrementing i from 1 to 20000. My sequence should be printed as 00001,00002,00003......20000 Thanks, Divya
Angel Dobbs-Sciortino
Ranch Hand
Joined: Sep 10, 2003
Posts: 101
posted
0
Use DecimalFormat. It will insert leading 0's into your String. DecimalFormat num = new DecimalFormat(�00000�); num.format(yourNumber); Angel Dobbs-Sciortino [ November 05, 2003: Message edited by: Angel Dobbs-Sciortino ]
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.