|
If Color objects were not immutable, what would we have to worry about? A good answer might be:Some outside agent might change the Color object that color refers to, and the Circle object would now have a different color. This might not be wanted. | |
Color Test AppletHere is an applet that tests the new features. It draws ten circles in red and ten circles in blue. The red circles are moved slightly to the left, and the blue circles are moved slightly to the right.
Here is what the applet draws. | |
QUESTION 14:What would you do if you had a pair of red/blue 3D vision glasses? Click Here after you have answered the question |