Final Instance Fields
- Good idea to mark immutable instance fields as final
private final int day;
- final object
reference can still refer to mutating object
private final ArrayList
elements;
- elements can't
refer to another array list
- The contents of the array list can change
previous |
start |
next .... [Slide 22] ....