public class Point extends Object
| Constructor and Description |
|---|
Point(double x,
double y)
Initializes a new instance of the
Point class. |
| Modifier and Type | Method and Description |
|---|---|
double |
getX()
Gets the x-coordinate.
|
double |
getY()
Gets the y-coordinate.
|
static Point |
parse(String s)
Converts the string representation of a point to its class equivalent.
|
String |
toString() |
public Point(double x,
double y)
Point class.x - The x-coordinate.y - The y-coordinate.public double getX()
public double getY()
public static Point parse(String s)
s - A string containing a point to convert.Point class that is equivalent to the value specified in s parameter.IllegalArgumentException - s does not represent a point in a valid format.Copyright © 2026. All rights reserved.