NOTE

final

Usage of final on classes, methods, and variables.

JavaCreated Updated 1 min readhistorical

This is a historical learning note and may contain outdated or incomplete understanding.

1. Usage

  • Applied to a class: means the class cannot be inherited.
  • Applied to a method: means the method cannot be overridden.
  • Applied to a variable: means the variable can be assigned only once and its value cannot be changed afterward (a constant).

Discussion

Sign in with GitHub to comment. Discussions are stored as GitHub Issues.View on GitHub