In Java, it is perfectly legal to define final
arguments in interface methods and do not obey that in the implementing class, e.g.:
public inter
It doesn't seem like there's any point to it. According to the Java Language Specification 4.12.4:
Declaring a variable final can serve as useful documentation that its value will not change and can help avoid programming errors.
However, a final
modifier on a method parameter is not mentioned in the rules for matching signatures of overridden methods, and it has no effect on the caller, only within the body of an implementation. Also, as noted by Robin in a comment, the final
modifier on a method parameter has no effect on the generated byte code. (This is not true for other uses of final
.)