Object References
- Describe the location of objects
- The new operator returns a reference to a new object
Rectangle box = new Rectangle();
- Multiple object variables can refer to the same object
Rectangle box = new Rectangle(5, 10, 20, 30);
Rectangle box2 = box;
box2.translate(15, 25);
- Primitive type variables ≠ object variables