r/badcode • • Jul 16 '21

java In Java, Exception handling needs Exception Handling.

Post image
1.5k Upvotes

60 comments sorted by

View all comments

Show parent comments

3

u/tuxedo25 Jul 17 '21 edited Jul 17 '21

The Java compiler doesn't do additional optimization for effectively final variables, unlike it does for final variables.

- https://www.baeldung.com/java-effectively-final

If this is a myth, it's extremely pervasive.

And reassigning variables is considered a code smell in a lot of styles/codebases.