Point
Leave feedback
On this page
Inheritance: java.lang.Object
public class Point
Represents a point.
| Constructor | Description |
|---|---|
| Point(double x, double y) | Initializes a new instance of the Point class. |
| Method | Description |
|---|---|
| getX() | Gets the x-coordinate. |
| getY() | Gets the y-coordinate. |
| parse(String s) | Converts the string representation of a point to its class equivalent. |
| toString() |
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. |
public double getX()
Gets the x-coordinate.
Returns: double - A double value that represents the x-coordinate.
public double getY()
Gets the y-coordinate.
Returns: double - A double value that represents the y-coordinate.
public static Point parse(String s)
Converts the string representation of a point to its class equivalent. A return value indicates whether the conversion is succeeded or failed.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| s | java.lang.String | A string containing a point to convert. |
Returns: Point - The instance of Point class that is equivalent to the value specified in s parameter.
public String toString()
Returns: java.lang.String
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.