What two variables do you expect a Point object to have?

A good answer might be:

A point consists of a pair of numbers, (x, y).

Description of a Class

This is still a little vague. In a mathematics book, a point will be given a precise mathematical definition. For programming, a precise software description of class Point is needed. The Java class libraries come with descriptions of the classes within them. A printed reference for Java will have documentation for Point under the section for the AWT. If you downloaded the JDK documentation from Sun Microsystems, browse through the hypertext index.

If you are using a Java development environment like Cafe or J++, type in the word Point in the program editing window, put the cursor over it, and hit the F1 key. You should get documentation similar to the following:
public  class  java.awt.Point   

    // Fields
    public int x; 
    public int y; 

    // Constructors
    public Point();                 // creates a point at (0,0)
    public Point(int  x, int  y);   // creates a point at (x,y)
    public Point( Point pt );       // creates a point at the location given in pt

    // Methods
    public boolean equals(Object  obj);     // checks two point objects for equal data
    public void move(int  x, int  y);       // changes the (x,y) data of a point object 
    public String toString();               // returns character data that can be printed

(I've left out some methods we won't be using.) For now, ignore the word "public" in the above.

The documentation for a class will show the data it contains (its variables) and the methods you can use to manipulate that data. Also shown are the constructors that are used to create an object of the class. Sometimes (as here) the variables of a class are called "fields." Notice that the two variables are named "x" and "y" and are of type int.

QUESTION 3:

There are three constructors listed for Point. Each one creates a Point. What is the difference between the constructors?

Click Here after you have answered the question