Section 8.13 final Instance Variables

• In the context of an app’s code, the principle of least privilege (p. 343) states that code should be granted only the amount of privilege and access that it needs to accomplish its designated task.

• Keyword final specifies that a variable is not modifiable. Such variables must be initialized when they’re declared or by each of a class’s constructors.

Get Java™ How To Program (Early Objects), Tenth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.