Is it good, if the java code is oversaturated with final variables? I think about performance. As far as I know, the final variables are thread safe. So, for each initialization on final variable jvm must synchronize its value among all threads. If I use final variables in every case where I want the variable to be non-modifiable, will it strike performance?
I expect and afraid that final variables will DECREASE the performance.
Aucun commentaire:
Enregistrer un commentaire