This website is preserved for historical and scholarly reference and is no longer actively maintained.
QUIZ 9
September 10, 1997
#1. Draw the result (in the style of the text) of executing the following code. You should draw boxes for the variables p and q, draw hexagons for objects, and show pointers from p and q.
Point p = new Point (0,0);
Point q = p;
#2. Draw the result (in the style of the text) of executing the following code. You should draw boxes for the variables p and q, draw hexagons for objects, and show pointers from p and q.
Point p = new Point (0,0) ;
Point q = (Point) p.clone ( );