Please enable JavaScript to use CodeHS


CodeHS Lessons

When a mutable object is a constructor parameter, the instance variable should be initialized with a copy of the referenced object. In this way, the instance variable is not an alias of the original object, and methods are prevented from modifying the state of the original object.

11.2 Constructors
12.11 Key Terms for Classes
6.11 Key Terms for Classes
4.11 Key Terms for Classes