title: Get multiple list from a single arraylist
body: <p>I need to get a multiple list of objects(Student) using an attribute(Location) of the particular object, the code is like below,</p>
  
  <pre><code>   List&lt;Student&gt; studlist = new ArrayList&lt;Student&gt;();
      studlist.add(new Student("1726", "John", "New York"));
      studlist.add(new Student("4321", "Max", "California"));
      studlist.add(new Student("2234", "Andrew", "Los Angeles"));
      studlist.add(new Student("5223", "Michael", "New York"));
      studlist.add(new Student("7765", "Sam", "California"));
      studlist.add(new Student("3442", "Mark", "New York"));
  </code></pre>
  
  <p>I need 3 separate lists here based on locations.</p>
  
  <p>1.Newyork list
  2.California list
  3.Los Angeles list</p>
  
  <p>Can anyone tell me the right way here? Thanks in advance.</p>