title: Print ArrayList Object
body: <p>I have created several objects and I want to print only one parameter of the objects in ArrayList:</p>
  
  <pre><code>Superhero batman = new Superhero("Bruce", 26, "Batman");
  Human rachel = new Human("Rachel", 24);
  
  Superhero ironman = new Superhero("Tony", 35, "Ironman");
  Human pepper = new Human("Pepper", 22);
  
  List&lt;Human&gt; people = new ArrayList&lt;Human&gt;();
  people.add(batman);
  people.add(rachel);
  people.add(ironman);
  people.add(pepper);
  </code></pre>
  
  <p>I want to print: </p>
  
  <pre><code>Bruce
  Rachel
  Tony
  Pepper
  </code></pre>