Java Reference
In-Depth Information
Rectangle box2 = box;
// See Figure 20
box2.translate(15, 25);
54
55
Figure 19
Copying Numbers
Since
box
and
box2
refer to the same rectangle after step
, both variables refer to
the moved rectangle after the call to the
translate
method.