- 
- 
Field Summary
Fields 
| Modifier and Type | Field | Description |  
| float | x | The X coordinate of this Point2D. |  
| float | y | The Y coordinate of this Point2D. |  
 
 
- 
Constructor Summary
Constructors 
| Constructor | Description |  
| Float() | Constructs and initializes a Point2Dwith
 coordinates (0, 0). |  
| Float(float x,
     float y) | Constructs and initializes a Point2Dwith
 the specified coordinates. |  
 
 
- 
Method Summary
All Methods Instance Methods Concrete Methods 
| Modifier and Type | Method | Description |  
| double | getX() | Returns the X coordinate of this Point2Dindoubleprecision. |  
| double | getY() | Returns the Y coordinate of this Point2Dindoubleprecision. |  
| void | setLocation(double x,
           double y) | Sets the location of this Point2Dto the
 specifieddoublecoordinates. |  
| void | setLocation(float x,
           float y) | Sets the location of this Point2Dto the
 specifiedfloatcoordinates. |  
| String | toString() | Returns a Stringthat represents the value
 of thisPoint2D. |  
 
 
 
- 
- 
Method Detail
- 
setLocationpublic void setLocation(double x,
                        double y)Sets the location of this Point2Dto the
 specifieddoublecoordinates.
 
- Specified by:
- setLocationin class- Point2D
- Parameters:
- x- the new X coordinate of this- Point2D
- y- the new Y coordinate of this- Point2D
- Since:
- 1.2
 
 
- 
setLocationpublic void setLocation(float x,
                        float y)Sets the location of this Point2Dto the
 specifiedfloatcoordinates.
 
- Parameters:
- x- the new X coordinate of this- Point2D
- y- the new Y coordinate of this- Point2D
- Since:
- 1.2