3 ms·
I would use final if something is final because it would also help to understand the code. It is a piece of information that something is final. Don't forget t
by Tichy 17y ago
I would use final if something is final because it would also help to understand the code. It is a piece of information that something is final.
Don't forget that final things can still be changed, though.
somethingFinal.setName("teehee"); is still possible even if somethingFinal is final.
- gdp 17y agoSure, but that would be deliberately going against the tips in the article. The idea is to not mutate values, rather, you instantiate new objects to store new values.