Java Point.getX()
Syntax
Point.getX() has the following syntax.
public double getX()
Example
In the following code shows how to use Point.getX() method.
import java.awt.Point;
// ww w . j a va 2 s. c o m
public class Main {
public static void main(String[] args) {
Point p = new Point();
p.setLocation(2.3D,3.3D);
System.out.println(p.getX());
System.out.println(p.getY());
}
}
Home »
Java Tutorial »
java.awt »
Java Tutorial »
java.awt »