title: Create a list of values from getters of a List of objects
body: <p>Okay so let's say I have a really simple class, e.g. </p>
  
  <pre><code>public class Baby {
     private String Name = "alf";
     public String getName() {
        return Name;
     }
  }
  </code></pre>
  
  <p>Now what I'd like to know. Given a list of Baby's, is there any niftier/cooler/shorter way in Java to create an array/arraylist of the Baby's names' rather than simple looping through all the babies and adding their names to the new list? The equivalent of this:</p>
  
  <pre><code>ArrayList&lt;Baby&gt; babies = new ArrayList&lt;Baby&gt;();
  /* some code adding a bunch of babies to the arraylist */
  
  ArrayList&lt;String&gt; names = new ArrayList&lt;String&gt;();
  for (Baby b : babies) {
    names.add(b.getName());
  }
  </code></pre>
  
  <p>...but <em>cooler.</em> Know what I mean?</p>