try
System.out.printf("%-4.4s\n",10 + "%");
System.out.printf("%-4.4s\n",100+ "%");
System.out.printf("%-4.4s\n",0+ "%");
this can be verified with
System.out.printf("%-4.4s|\n",10 + "%");
System.out.printf("%-4.4s|\n",100 + "%");
System.out.printf("%-4.4s|\n",0+ "%");
which produces
10% |
100%|
0% |