I'm new to Java and I'm at my wits' end.
I have got my program to work, but I need help with the formatting when printing out.
if(count == 3)
System.out.printf ("%-15s %15s %15s %15s %15s %n", n, " is compatible with ",dates[k],dates[k+1],dates[k+2]);
My output is:
Stacey Francis is compatible with Owen Farrell Jack Clifford Joshua Watkins
I would like my output to be (without repeating stacey francis name or "is compatible with":
Stacey Francis is compatible with Owen Farrell
Jack Clifford
Joshua Watkins
Just wondering how to go about this?