Java Point() Constructor
Syntax
Point() constructor from Point has the following syntax.
public Point()
Example
In the following code shows how to use Point.Point() constructor.
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.getLocation());
}
}
Home »
Java Tutorial »
java.awt »
Java Tutorial »
java.awt »