Hello I want to print something so they are aligned.
for (int i = 0; i < temp.size(); i++) {
//creatureT += "[" + temp.get(i).getCreatureType() + "]";
creatureS = "\t" + temp.get(i).getName();
creatureT = " [" + temp.get(i).getCreatureType() + "]";
System.out.printf(creatureS + "%15a",creatureT + "\n");
}
and the output is
Lily [Animal]
Mary [NPC]
Peter [Animal]
Squash [PC]
I just want the [Animal], [NPC], and [PC] to be aligned like
Lily [Animal]
Mary [NPC]
Peter [Animal]
Squash [PC]
Say I know that no name will be greater then 15 characters.