title: Use array to add more than one type, multiple times
body: <pre><code>/*
   * To change this template, choose Tools | Templates
   * and open the template in the editor.
   */
  package demo;
  
  /**
   *
   * @author mikel
   */
  public class Individual {
  
      private String name;
      private String surname;
      private String phone;
      private String mail;
      private String afm;
      private int icode;
      private int year;
      private int month;
      private int day;
      private int grade;
      private int i=1;
  
  
      /*----------get-----------*/
          public String getName()
          {
              return this.name;
          }
  
          public String getSurname()
          {
              return this.surname;
          }
  
          public String getPhone()
          {
              return this.phone;
          }
          public String getMail()
          {
              return this.mail;
          }
          public String getAfm()
          {
              return this.afm;
          }
          public int getiCode()
          {
              return this.icode;
          }
          public int getYear()
          {
              return this.year;
          }
          public int getMonth()
          {
              return this.month;
          }
          public int getDay()
          {
              return this.day;
          }
          public int getGrade()
          {
              return this.grade;
          }
      /*----------set-----------*/    
  
          public void setName(String name)
          {
              this.name = name;
          }
  
          public void setSurname(String surname)
          {
              this.surname = surname;
          }
  
          public void setPhone(String phone)
          {
              this.phone = phone;
          }
  
          public void setAfm(String afm)
          {
              this.afm = afm;
          }
  
          public void setiCode(int icode)
          {
              this.icode = icode;
          }
  
          public void setYear(int year)
          {
              this.year = year;
          }
  
          public void setMonth(int month)
          {
              this.month = month;
          }
  
          public void setDay(int day)
          {
              this.day = day;
          }
  
          public void setGrade(int grade)
          {
              this.grade = grade;
          }
  </code></pre>
  
  <p>I'm learning Java right now, and I had a question, I need to add information for more than one person in an array, but in this array I would like to have more than one type of info.
  What I mean:</p>
  
  <pre><code>John Smith 964564 email@gg.com 564789
  
  Mikel Nan  589456 email@gg.com 123123
  </code></pre>
  
  <p>So the result looks like an array.</p>
  
  <p>My project asks the program to be able to print on screen a list of all names and info of people that I add.</p>
  
  <p>Using this as a solution, that I saw in an other answer I don't get the expected result.</p>
  
  <pre><code>Object[] obj = new Object[]{name, surname, phone, mail, afm};
  </code></pre>
  
  <p>Also I want to add more than one person in this list, so in that way I have to make more objects or there is another way?</p>
  
  <p>Thank you in advance for your time!
  Sorry if my explanation isn't so clear.</p>