|
What is the difference in the constructors? A good answer might be:Each constructor requires the user to supply different data. | |
Multiple ConstructorsAny of the three constructors can be used to instantiate a Point. (Remember that "instantiate" means "create an object.") It is a matter of convenience which constructor you use. Here is a program that instantiates some points:
import java.awt.* says to use the AWT library that is part
of java. The "*" says that everything defined in the library can be used
(although this program only uses the Point class.)
| |
QUESTION 4:
Say that the program has just been loaded into main memory
and is just about to start running. |