Here is how you can format your string without using DecimalFormat
.
String.format("%02d", 9)
09
String.format("%03d", 19)
019
String.format("%04d", 119)
0119
Here is how you can format your string without using DecimalFormat
.
String.format("%02d", 9)
09
String.format("%03d", 19)
019
String.format("%04d", 119)
0119