title: Java seems to be ignoring my toString method
body: <p>Ok, so I have made a toString() method for this Coordinate Class, but when I try to print a Coordinate using system.out.print(), it seems to ignore my method and just use the Object.toString() method, and just returns a memory address.</p>
  
  <p>Here is my code for the toString method:</p>
  
  <pre><code>package spacetable;
  
  public class Coordinate {
  private int x;
  private int y;
  
  public Coordinate(){
      x=0;
      y=0;
  }
  public Coordinate(int x, int y){
      this.x = x;
      this.y = y;
  }
  
  public int getX(){
      return x;
  }
  public int getY(){
      return y;
  }
  
  public double distTo(Coordinate xy){
      double run = xy.getX() - this.getX();
      double rise = xy.getY() - this.getX();
      double dist = sqrt(run*run + rise*rise);
      return dist;
  }
  public double distTo(int x, int y){
      double run = x - this.getX();
      double rise = y - this.getX();
      double dist = sqrt(run*run + rise*rise);
      return dist;
  }
  
  @Override
  public String toString(){
      String Strx = Integer.toString(x);
      String Stry = Integer.toString(y);
      String result = "(" Strx + ", " + Stry + ")";
      return result;  
  }
  </code></pre>
  
  <p>}</p>
  
  <p>and my code that tries to print:</p>
  
  <pre><code>package spacetable;
  public class CordinateTest {
  
  public static void main(String[] args) {
      Coordinate place = new Coordinate(2,3);
      System.out.println(place);
  }
  }
  </code></pre>
  
  <p>And the output is:
  spacetable.Coordinate@e53108</p>
  
  <p>why is my toString() being ignored?</p>