title: How to print out inputted ArrayList
body: <p>I'm trying to print out what I inputted for my ArrayList but I keep getting weird results such as this <code>[player@42a57993, player@75b84c92, player@6bc7c054]</code> when I clearly put in legitimate names. So take a look at my code and see what the problem might be:</p>
  
  <pre><code>if (o == 5) {
      double RD, t, old, x;
      String tournament, player;
      int a, number_of_players, place;
      ArrayList&lt;player&gt; players = new ArrayList&lt;player&gt;();
      System.out.println("1:Add a tournament \t2:View Existing");
      a = keyIn.nextInt();
          if (a == 1) {
              System.out.println("\nEnter tournament name");
              tournament = keyIn.next();
              System.out.println("\nEnter number of players");
              number_of_players = keyIn.nextInt();
              System.out.println("Enter players");
              for (int i = 0; i &lt; number_of_players; i++) {
                  String name = keyIn.next();
                  player plr = new player();
                  plr.setName(name);
                  players.add(plr);
              }
              System.out.println("Enter places for");
              System.out.println(players);
              place = keyIn.nextInt();
  </code></pre>
  
  <p>Here is my <code>player</code> class:</p>
  
  <pre><code>public class player {
  
      private static String name;
  
      public void setName(String pName)
      {
          name = pName;
      }
  
      public String getName()
      {
          return name;
      }
  }
  </code></pre>
  
  <p>Let me know what you guys come up with! Thanks!</p>