I am trying to do something like this in java (Eclipse Indigo):
input - 16 (integer);
Output - "0016" ;
input - 201 (integer);
Output - "0201" ;
intput - 1716 (integer);
Output - "1716" ;
In VB.net, I could use:
dim num as integer
dim str as string
str = Format(num, "0000")
How can i do the same in java? Thanks in advance...
source
share