how to get maximum value from the List/ArrayList
<p>There is an ArrayList which stored the integer value and i need to find the maximum value.</p>

<pre><code>    e.g. suppose the arrayList stored values are : 10, 20, 30, 40, 50 and the max
value would be 50.
</code></pre>

<p>What is the eeficient way to find the maximum value?</p>

<p><em><strong>@Edit :</em></strong> I just found one soluntion whether i am not very sure </p>

<pre><code>ArrayList&lt;Integer&gt; arrayList = new ArrayList&lt;Integer&gt;();
arrayList.add(100); /* add(200), add(250) add(350) add(150) add(450)*/

Integer i = Collections.max(arrayList)
</code></pre>

<p>and this returns the highest value</p>

<p>another way to compare the each value e.g. <code>selection sort or binaray sort algorithm</code></p>
