int myNum1 = 1111; Integer myNum2 = 112; System.out.println(String.format("%06d",myNum1)); System.out.println(String.format("%06d",myNum2));orm
字符串長度6位 不足的前面補零。字符串