title: Get ranks to iterating ArrayList value
body: <p>I have five values in an ArrayList like <code>{50,25,50,30,10}</code> . I want to set ranks in every value, So please tell me how I could do this. The output is like </p>
  
  <pre><code>50-&gt;1st rank
  50-&gt;1st rank
  30-&gt;2nd rank
  20-&gt;3rd rank
  10-&gt;4th rank
  </code></pre>