Skip to content
loading...

re: Why it is not possible to extend a final class in Java? VIEW POST

TOP OF THREAD FULL DISCUSSION
re: The final keyword in Java means: „can‘t be modified“. Applied to a field/variable it means: it‘s a constant (the value can’t be modified.) Applied ...
 

Applied to a field/variable it means: it‘s a constant (the value can’t be modified.)

To be more correct: the variable assignment cannot be modified. Only in case of primitives and immutable objects the value cannot be modified.

final String[] foo = String[] { "bar" };
foo[0] = "quux"; // this is legal.
code of conduct - report abuse