while printing only..if you want that leading zero means..i think only the way you should use string... and after that you want it as integer value means just parse it as integer...
try like this....
public class strtes
public static void main(String args)
I assume the number should have a specific length front padded with zeros, right? i.e.
Well, then as I said, follow the link for "format string". You call tell format that you want the number to be three digits long and front padded with zeros. Then you do not have to decide when to pad, format will.
So, I need to ask, did you actually read what I told to read, and attempt to figure it out, or do you just want "teh codes" (mispelled on purpose).