java不足前面补0

// 0 代表前面补充0 // 3代表长度为3 // d 代表参数为正数型

result=String.format("%0"+3+"d",result);

  

原文地址:https://www.cnblogs.com/JAYIT/p/9295430.html