title: Trying to print out a object with a toString method I made, getting what I believe to be is hashCode? How do I output a String?
body: <p>So I currently trying to get my objects (in this case Person, Student, Employee, or hourlyEmployee) to print from an object array that stores all of their data. The array itself is working correctly, however when I try to print out a Person object, say for example in this case a student named billy, which then consists of a String name, int Social Security Number, int age, String gender, String address, int telephone, double GPA, String Major, and int yearOfGraduation in that order, it does print out the information correctly. Here is how I create the objects:</p>
  
  <pre><code>private Person billy = new Student("Billy", 111111111, 19, "Male", "404 Test Ave S", 1111111111, 4.0, "Business and Economics", 2018);
  </code></pre>
  
  <p>Here is the toString method I made in the Student class that descends from the parent class Person:</p>
  
  <pre><code>public String toString(String name, int ssn, int age, String gender, String address, int telephone, double GPA, String major, int grad){
      String superResult = super.toString(name, ssn, age, gender, address, telephone);
      String result = "\nGPA: " + GPA + "\nMajor: " + major + "\nGraduation Year: " + grad;
      return superResult + result;
  }
  </code></pre>
  
  <p>and finally here is how I am trying to output it with the array:</p>
  
  <pre><code>        for(int i = 0; i &lt; user.getPeople().length; i++){
              String string = user.getPeople()[i].toString();
              System.out.println(string);
          }
  </code></pre>
  
  <p>in this case it is supposed to go through the array, and print out all of the values that it has in it. I do not think it is something with the for-loop itself, but something with the way I am converting the values of the objects into a string format. </p>
  
  <p>Is there a way to convert from hashCode into the intended String, or a way so it would print out as a normal String in the first place?</p>