-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Most classes that are not simply utility classes containing static methods contain properties that could be marked 'final' to make them immutable. Up until now, I have been avoiding declaring these fields 'final' because they might be given by the textbook as mutable variables.
However, this generates compiler warnings. Adding 'final' does not affect the semantics of the code, but does clarify that they are never modified.
At what point in the textbook is the keyword 'final' explained? Is it acceptable to declare these final?
Metadata
Metadata
Assignees
Labels
No labels