| Java FAQ | ||
| JSP FAQ | ||
| Servlet FAQ | ||
XyzWs Java FAQ:
What does the "final" modifier mean on a method parameter?
Printer-friendly version |
Mail this to a friend
|
Advertisement
|
What does the final modifier mean on a method parameter?Use the final modifier on formal parameters to methods when you want to make it clear that the supplied value can be not modified inside the method. The compiler would complain as soon as you accidentally try to assign it a new value inside the method. Anonymous classes that need to access method's parameters are another use case of final method parameters.
|