« Back to home

Java annoyance: final parameters

First, the summary:

Q: What does it mean when a method I’m calling declares that its parameters are final?

A: To you, nothing. It’s a safety feature for the author of the method.

Q: OK, so when should I declare method parameters as final?

A: Absolutely always.

Q: Isn’t that just annoying busywork?

A: Pretty much so, yes. You must be new to Java.

And now, the lengthy discussion.

Read more »