title: Java extracting individual data from an object list
body: <p>I have a Java Class like this:</p>
  
  <pre><code>public class Employee {
    String Name;
    int Id;
    int Age;
  
    void setName(String tempVal) {
      Name = tempVal;
      System.out.println(Name);
      System.out.println("\n");
    }
  
    void setId(int parseInt) {
      Id = parseInt;
      System.out.println(Id);
      System.out.println("\n");
    }
  
    void setAge(int parseInt) {
      Age = parseInt;
      System.out.println(Age);
      System.out.println("\n");
    }
  
  }
  </code></pre>
  
  <p>Now I want to parse a employees.xml file using SAXParser using the code in the link: <a href="http://totheriver.com/learn/xml/xmltutorial.html#5.2" rel="nofollow">http://totheriver.com/learn/xml/xmltutorial.html#5.2</a></p>
  
  <p>The problem is when I am adding the tempEmp to the list and accessing the list to print its value in printData() method, the output is something like:</p>
  
  <pre><code>No of Employees '3'.
  
  Employee@140de537
  
  Employee@1c43882a
  
  Employee@15a08be5
  </code></pre>
  
  <p>Now, how do I extract the name, age and id of the employee individually?</p>