java中整数前进行'0'填充
java中整数前进行'0'填充:
DecimalFormat df=new DecimalFormat("0000"); Integer last = categories.size() + 1; System.out.println("流水号:"+df.format(last)); code = first + "-" + df.format(last); System.out.println("分类编号:"+ code);
效果:
bug怎么这么多!