Hacker News new | ask | show | jobs
by baud147258 2966 days ago
For java code, use final so that you have constants.
1 comments

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.
Good point regarding mutable data. But since we were talking about loglevels, I don't think it's a problem there.