How do you left pad an int
with zeros when converting to a String
in java?
(你怎么离开垫的int
转换成时用零String
在java吗?)
I'm basically looking to pad out integers up to 9999
with leading zeros (eg 1 = 0001
).
(我基本上是希望用前导零填充最大9999
整数(例如1 = 0001
)。)
ask by Omar Kooheji translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…