unfortunately, there is no formatter, I'd also would be happy if there
was one. but you can make a helper function which formats numbers with
padding zeros:
String fn(int num, int pads) {
if(num>=10)return Integer.toString(num);
char[] z;
for(z= new char[pads], int i=0; i<z.length; i++) z[i]='0';
return "" + new String(z) + Integer.toString(num);
}
and then:
{
String str = ""+fn(0,4)+" "+fn(9,1) + " " + fn(12); //would result i n
"0000 09 12"
}
ok, its ugly, but does the job