I've seen the question in Best way to create enum of strings? , and I found that they used final in the constructor parameter, I think it's unnecessary, anyone can tell me why? thanks..
Asked
Active
Viewed 26 times
0
-
Same answer as for why you do it on a method. – T.J. Crowder Feb 12 '18 at 07:24
-
Do you know what `final` means? Maybe this can help you `https://stackoverflow.com/questions/500508/why-should-i-use-the-keyword-final-on-a-method-parameter-in-java` or this one `https://stackoverflow.com/questions/2236599/final-keyword-in-method-parameters` . In general, it is not necessary. – ikos23 Feb 12 '18 at 07:27