For #3, tell it to get the length of the String (length or size, I
forget). Then do something like:
String str="";
for(int i=0; i<num.length; i++)
{
str+="0";
}
DecimalFormat formatter = new DecimalFormat(str);
It's not very efficient, but it should work.