As far as I know, the final keyword does not affect the performance of your variables.
I believe that the main goal is to help you find errors. If you know that something will never change, you mark it as such. Similar to why we use annotations in which we can, at any time when we can trade a runtime error for a compile-time error, we do. Finding a mistake when you work on it, and it is fresher in your mind, and it did not disappear or spoil someone’s data because of which you lost customers, yes, that’s very good. You get a compilation error, you fix it, move on, you don’t break the nightly build, yes, these are good things.
corsiKa
source share