I'm writing the following for a class assignment:
public class SportsBall {
public static void printDivision (String divName, String heading1, String heading2) {
System.out.printf("%-30s", divName + heading1 + heading2);
}
public static void main(String[] args) {
printDivision("bla ", "blahhhh ", "Northwest");
}
}
The problem I'm having is specifying the length of the strings divName, heading1, and heading2. "%-30s" formats one of them, on either end, but for the life of me, I can't get the formatting right to set a length for each one. I tried three sets of specifiers separated by commas but it just prints the additional specifiers. I know this is probably something really simple...