Move a player to another team, with players stored in one arraylist and teams in another using java
<p>Basically I have a team class, which has an array list that store the players in. In the driver class there's an arraylist that stores the teams.</p>

<p>Anyhow I've worked out how to add a player to a specific team and likewise remove a player from said team. Where I'm hitting problems is when I try to transfer one player to another.</p>

<p>My understanding is to scan through the first team, and get the player. Then somehow add this player to another, by scanning through the chosen team and add to it?</p>

<p>I've tried this way but it seems to replace the original player with the new player in both teams. </p>

<p>My other approach would be to somehow return the parameters of the player object, create another with the return parameters, remove the original then add the new instance in the other team?</p>

<p>Really not quite generally how I can go about this, been trying all afternoon!<br>
If someone could offer me a general idea, then I can go off and apply the understanding to practice.</p>
