title: Trying to print out the contents of an ArrayList
body: <p>I'm trying to print out the contents of the ArrayList "list", but I keep getting what I think is the locations of the elements and not the contents.    </p>
  
  <pre><code>import java.util.*;
  public class Assignment23 {
  
  public static void main (String[] args){
  
  ArrayList&lt;Point&gt; list = new ArrayList&lt;Point&gt;();
  for(int i = 0; i &lt; 99; i++){
      list.add(new Point());
  }
  Collections.sort(list);
  System.out.println(""+list);
  }
  }
  class Point implements Comparable&lt;Point&gt;{
  int x = (int)(Math.random()*-10);
  int y = (int)(Math.random()*-10);
  </code></pre>