Final
final
means the cannot be modified in certain ways.
Variable
When using with variable, this means the variable cannot be changed. which is used commonly to create constant.
class Foo {
final int size = 3
}
Method
When pair with method, this means the method cannot be overriden.
class Foo {
final String doNotOverride() {
}
}
Class
When pair with class, this means the class cannot be extended
final class DoNotExtend {
// cannot exend this class
}