我想在Java(Eclipse Indigo)中实现类似的功能:
input - 16 (integer);
Output - "0016" ;
input - 201 (integer);
Output - "0201" ;
intput - 1716 (integer);
Output - "1716" ;
在VB.net中,我可以使用以下代码:
dim num as integer
dim str as string
str = Format(num, "0000")
我该如何在Java中实现相同的功能?提前感谢...