Produce sorted arraylist from unsorted arraylist in 1 interation?
<p>Say I have arraylist <code>A</code> and to compare 2 objects of <code>A</code> I do <code>a.getDistanceFromPlayer() &lt; b.getDistanceFromPlayer()</code>.</p>

<p>I want to now have list <code>B</code> which will have all of <code>A</code>'s objects, but sorted where the first object is closest to player, and last object is furthest.</p>

<p>What might be the fastest way to do this?</p>

<p>Thanks</p>
