String.formatmethod. It can do a lot.
One thing you might be interested in is something like this:
maxLen is the space that every value in the
is suppose to take up. (You still need to write the algorithm and code to find
that based on the entries in the
The documentation (link below) can tell you all you want to know, but in this case,
"%1$"means that I'm interested in the first variable after the format string (form).
'maxLen'is an int that I created that tells how many spaces to use when creating the string.
'theNum'is an integer.
'theNum'is an integer that will be inserted into a
Stringreturned by the
Joseph Cooper (Former CS307 TA)