Print Page Print Page

CH10 – Point Objects And Attributes

  1. Create a new class name PointObject.
  2. Add a main method and add the following code.
import java.awt.Point;
public class PointObject {
  public static void main(String[] args){
    Point blank;
    blank = new Point(3,4);
  1. Compile and run the program.
$ javac
$ java PointObject