A good answer might be:
Just as the program is about to close, | |
Changing Data inside a PointLook again at the description of class Point. One of the methods is: This method is used to change the x and the y data inside a Point object. The modifier public means that it can be used anywhere in your program; void means that it does not return a value.public void move( int x, int y) ; This part of the description says that when you use move, you need to supply two int parameters that give the new location of the point. A parameter is information you supply to a method.( int x, int y) Here is the example program, modified again:
Here is what it writes to the screen: First values: java.awt.Point[x=12,y=45] Final values: java.awt.Point[x=-13,y=49] | |
QUESTION 12:
How many Point objects are created by this program? |