Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

How to add zeros to the left of a numeric String in Java?

Damian99Damian99 USAMember Posts: 116

I need to add zeros to the left of a number until it gets six digits.

Ex. If the number is 5, it should be formatted as 000005.

Can someone please let me know how to achieve this in Java?

Tagged:

Comments

Sign In or Register to comment.