I would like the output to display as following.
ID Name Club Goals
1234 Christiano Ronaldo Real Madrid 42
321 Rooney United 32
23122 Angel Di Maria United 45
This is what I have tried so far, but it's not working:
for (Player p : players)
{
System.out.println(p.getID() + "\t" + p.getName() + "\t"
+ p.getClub() + "\t" + p.getGoals());
total ++;
}
since \t act like tab, the data under club always get messy.
I have all the data in an ArrayList.