# Class Point

java.lang.Object
Point

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

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Point()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `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 Details

  - ### Point

    public Point()

- ## Method Details

  - ### 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:
      `NullPointerException` - if p is null.