Java将个位数6格式化为06

code

 System.out.println(String.format("%02d",6));

out

06

你可能感兴趣的:(java)