title: How to pass toString from child to parent using super.toString() in Java
body: <p>Working on a Java project to study Polymorphism. I am trying to learn how to pass a toString() up the line from the bottom child. I have to pass the toString form Hardware.java to Tool.java to ScrewDriver.java and then in Player.java, I need to print out an array that I have defined.</p>
  
  <p>Here is the files:</p>
  
  <pre><code>public class Player {
      public static void main(String[] args) {
          List&lt;Hardware&gt; hardware = new ArrayList&lt;&gt;();
          ScrewDriver screwdriver1 = new ScrewDriver("Flathead", "Use this to open paint cans", 150, "Woodworking", true, 15, 10);
  
          hardware.add(screwdriver1);
  
          for(Hardware tool : hardware)
              System.out.print(tool);
      }
  }
  
  public class Hardware {
      private String name;
      private String message;
      private int points;
  
      @Override
      public String toString() {
          super.toString();
          return "Name: " + name + " Message: " + message + " Points: " + points;
      }
  }
  
  public class Tool extends Hardware {
      private String type;
      private boolean isDangerous;
      private int percentDangerous;
  
      @Override
      public String toString() {
          super.toString();
          return "Type: " + type + " Message: " + isDangerous + " Percent Dangerous: " + percentDangerous;
      }
  }
  
  public class ScrewDriver extends Tool {
      private double length;
  
      @Override
      public String toString() {
          super.toString();
          return "Length: " + length;
      }
  }
  </code></pre>
  
  <p>The problem I am having is that the only thing that prints from the array is the Length.</p>
  
  <p>Any help would be very much appreciated! Thank you in advance.</p>