I made a ArrayList
( nomeTimes
) that receives a number of team names according to for
below:
for(int i = 0; i<numeroTimes;i++){
String nomeTime=entrada.next();
nomeTimes.add(nomeTime);
}
My idea is to duplicate this ArrayList
and shuffle with:
Collections.shuffle(nomeTimes);
And merge the data from the two Arraylists
into a third one.
In the case is to set up a table with the clashes of the teams. The clashes stored in the third ArrayList
would look like this: [[a,b][a,c][a,d],[[b,a],[b,c],[b,d]]
.
How to join the two in a third?