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