Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## Class Point

    java.lang.Object
      Point

    public class Point

A Point object represents an ordered pair of (x, y) coordinates in the 2D Cartesian plane.

Method Summary
`double` | `distance(Point p)` Computes and returns the distance between this point and the given other point.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### Point

    public Point()

Method Detail

### distance

    public double distance(Point p)

  Computes and returns the distance between this point and the given other point.

  Parameters:
    `p` - The point to which the distance is computed.
  Returns:
    The distance, computed as the square root of the sums of the squares of the differences between the two points' x-coordinates (dx) and between their y-coordinates (dy).
  Throws:
    `java.lang.NullPointerException` - if p is null.

Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD