Java zero fill
int number = 15;
int length = 5;
String.format("%0" + length + "d", number); // result 00015
Written by Rogério Alencar Lino Filho
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Java
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#