title: Java methods getting euclidean distance
body: <pre><code>public class Point
  { 
  // Placeholders for xcoordinate, ycoordinate, and quadrants
  int xcoord = 0;
  int ycoord =0;
  double distance = 0.0;
  String quadrant = ("NW");
  
  
  //moveUp changes the y coordinate 
  void moveUp (int x) {
      int moveUp = ycoord + x;
      ycoord= moveUp;
      System.out.println(moveUp);
      }
  // moveDown changes the y coordinate    
  void moveDown (int y){
      int moveDown = ycoord - y;
      ycoord =moveDown;
      System.out.println(moveDown);}
  // moveLeft changes the x coordinate    
  void moveLeft (int f){
      int moveLeft = xcoord -f ;
      xcoord = moveLeft;
      System.out.println(moveLeft);}
  // moveRight changes the x coordinate   
  void moveRight (int h) {
      int moveRight  = xcoord +h ;
      xcoord = moveRight;
      System.out.println(moveRight);}
  
  //  This takes the y coordinate and the xcoordinate and places it into a quadrant. Then it returns the quadrant.
  String quadrant () {    
      if (xcoord &gt;= 0 &amp;&amp; ycoord  &gt;=0){
          return quadrant = ("NE"); }
      else if ( xcoord &lt; 0 &amp;&amp; ycoord &lt; 0 ) {
          return quadrant = ("SW");}
      else if (xcoord &lt;0 &amp;&amp; ycoord &gt;0 ){
          return quadrant = ("NW");}
      else if (xcoord &gt;0 &amp;&amp; ycoord &lt;0){
          return quadrant = ("SE");}
      else {
          return quadrant = ("Origin");}  
  }
  //euclidean distance (?)
  Point distance (Point other) {
      Point result = new Point(); 
      result.ycoord = Math.abs (ycoord - other.ycoord);
      result.xcoord = Math.abs (xcoord- other.xcoord);    
      result.distance = Math.sqrt((result.ycoord)*(result.ycoord) +(result.xcoord)*(result.xcoord));
      System.out.println(result);
      return result;
  
      }
  
  }   
  </code></pre>
  
  <p>Here is the whole code. What I'm having trouble with is for some reason my distance method isn't working properly and I don't know why. It returns <code>Point@24a42c89</code>, instead of any number. Please let me know why it is returning this instead of a number. Thanks so much. I'm a beginner and have little knowledge on Java.</p>