2010-10-27 20 views

Répondre

5

%05d devrait le faire, je crois

+0

Yeap, ça marche! – Roman

+0

Cool :-) La meilleure liste d'exemples de formatage que je peux trouver est ici: http://www.java2s.com/Tutorial/Java/0120__Development/0200__printf-Method.htm –

2
int a=123; 
System.out.println(String.format("%05d",a));