Every element in ArrayList is last element added?
<p>I've got a list of <code>Places</code>. Each <code>Place</code> has a ArrayList of other <code>Place's</code> which are linked to it.</p>

<p>When a <code>Place</code> is created it stores an ArrayList of <code>places</code>. This ArrayList is generated like so...</p>

<pre><code> public ArrayList&lt;Place&gt; getPlaces(){
`  for(Place p : link.getPlaces()){
      places.add(new Place("Value1","Value2");
   }
   return places;
 }
</code></pre>

<p>However, the value in <code>places</code> seems to always be the last element created. I've checked the constructor of <code>place</code> and the places that are being created are different however the value which I receive back in the ArrayList is not. Why would this be happening?</p>

<p>If It helps I'm calling this code from another class which prints the places with something like this...</p>

<pre><code>ArrayList&lt;Place&gt; places = p.getPlaces(); //Where p is a place.
for(Place p : places){
   System.out.println(p.toString());
}
</code></pre>
