Y
Hacker News
new
|
ask
|
show
|
jobs
by
baud147258
2966 days ago
For java code, use final so that you have constants.
1 comments
_asummers
2966 days ago
Note these are only constant pointers. Your data is still mutable if the underlying data structure is mutable, (e.g. HashMap). Haven't used Java in a few years, but I made religious use of final, even in locals and params.
link
baud147258
2966 days ago
Good point regarding mutable data. But since we were talking about loglevels, I don't think it's a problem there.
link