How do I add left-padded zeros to a number in Java?

Posted by Stig Christian on Stack Overflow See other posts from Stack Overflow or by Stig Christian
Published on 2010-04-24T15:54:36Z Indexed on 2010/04/24 16:13 UTC
Read the original article Hit count: 271

Filed under:
|

I have an integer 100, how do I format it to look like 00000100 (always 8 digits long)?

© Stack Overflow or respective owner

Related posts about java

Related posts about string-formatting