
| Constructor and Description |
|---|
Point(int x,
int y)
Constructs a new point with the given x and y coordinates.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
int |
getX()
Returns the x coordinate of the point.
|
int |
getY()
Returns the y coordinate of the point.
|
int |
hashCode() |
void |
setX(int x)
Sets the x-coordinate.
|
void |
setY(int y)
Sets the y-coordinate
|
String |
toString() |
public Point(int x,
int y)
x - the x coordinate of the new pointy - the y coordinate of the new pointpublic int getX()
public int getY()
public void setX(int x)
x - the x-coordinatepublic void setY(int y)
y - the y-coordinateCopyright © 2018. All rights reserved.