Increment Int Number [closed]

Hero Revolution

New Member
\[quote\] Possible Duplicate:
Add leading zeroes to number in Java? \[/quote\]For my program I have to make this types of code i.e \[code\]ABC000001\[/code\], \[code\]ABC000002\[/code\] and so on,First three characters are fixed and after that code should incremented,code like :\[code\]int i = 000001;String str = "ABC";loop{ String temp = str + i; i = i + 1;}\[/code\]when I used \[code\]int\[/code\] 000001 consider as 1.if 10 code will show like \[code\]ABC000010\[/code\] and if code will 100 then \[code\]ABC000100\[/code\], \[code\]ABC000101\[/code\]And So on...So Any one can tell me what should I have to do to getting this type of Result.
 
Top