String s = String.format("%06",12); printf s = "000012" 转载于:https://www.cnblogs.com/donnieluo/p/6041877.html