I am trying to achieve even indentation in my output. So that even if the strings vary in length, the width between the strings will continue to match. What I mean is if I want to print a text file with a person's first name, age, and weight, but I want the indentation to remain even
Ryan 1 1
Alexander 25 180
Ashish P. 51 217
Ben 19 130
I know that a fixed width will not work because the name can be very long or short
writer.printf("%s%10d%10d", name, age, weight);
I am doing this using the PrintWriter.printf(), although I imagine it applies to System.out.printf() and .format() as well.