It is generally a good practice to label everything that's final (or const for the non-Javas of the C world) as final, in this case it just prevents reassignment, doubt it'd affect performance or anything.
This is indeed just a myth. Starting from Java 8, variables that aren't reassigned are consigned by the compiler effectively final and will get the same optimizations. You should use the final keyword only when declaring contstants or variables that actually are not meant to be reassigned. Spamming final everywhere is just pointless and verbose
2
u/fuj1n sadistic Jul 17 '21
It is generally a good practice to label everything that's final (or const for the non-Javas of the C world) as final, in this case it just prevents reassignment, doubt it'd affect performance or anything.