Sort list of objects interms of object's name
<p>I have a <strong>Fruit</strong> model class:</p>

<pre><code>public class Fruit{
   private String name;
   private String color;

   public Fruit(String name, color){
     this.name = name;
     this.color = color;
   }
   public getName(){
      return name;
   }
   public getColor(){
      return color;
   }
}
</code></pre>

<p>Then, I created a list of <code>fruits</code>:</p>

<pre><code>List&lt;Fruit&gt; fruits = new ArrayList&lt;Fruit&gt;();

fruits.add(new Fruit("Orange","orange"));
fruits.add(new Fruit("Strawberry","red"));
fruits.add(new Fruit("Apple","green"));
fruits.add(new Fruit("Banana","yellow"));
</code></pre>

<p>Now, I would like to sort the <code>fruits</code> elements in <strong>alphabetical order</strong> in terms of <strong>fruit name</strong> . How can I efficiently sort the fruits list?</p>
