How to Format and Display 2 Digit Integer in Java


String.format("%2d", 1);


This will ensure that a single digit integer will be padded with 0.

1 Comments

  1. I'm appreciate your writing skill.Please keep on working hard.^^

    ReplyDelete

Post a Comment

Post a Comment

Previous Post Next Post
NERV Open Source
Building production Spring Boot systems?

Explore NERV — open-source Java libraries for audit trails, persistence, exception handling, and reliable event-driven architecture.