Check out example codes for "padding a string with 0 in java". It will help you in understanding the concepts better.

Code Example 1

String.format("%05d", yournumber);
//%05 means length of 5
// 25 becomes 00025

Learn ReactJs, React Native from akashmittal.com