Point

Inheritance: java.lang.Object

public class Point

Represents a point.

Constructors

Constructor Description
Point(double x, double y) Initializes a new instance of the Point class.

Methods

Method Description
getX() Gets the x-coordinate.
getY() Gets the y-coordinate.
toString()

Point(double x, double y)

public Point(double x, double y)

Initializes a new instance of the Point class.

Parameters:

Parameter Type Description
x double The x-coordinate.
y double The y-coordinate.

getX()

public double getX()

Gets the x-coordinate.

Returns: double - A double value that represents the x-coordinate.

getY()

public double getY()

Gets the y-coordinate.

Returns: double - A double value that represents the y-coordinate.

toString()

public String toString()

Returns: java.lang.String