Newsletter sign-up
View all newsletters

Enterprise Java Newsletter
Stay up to date on the latest tutorials and Java community news posted on JavaWorld

JavaWorld Daily Brew

final local variable


Tags:

I'm learning JSF 2.0 now i always see in sources similar syntax when in in method local reference type variable is declared final.
For what ?
like in mojarra-2.0.3-FCS-source\jsf-ri\src\main\java\com\sun\faces\application\view\StateManagementStrategyImpl.java in method restoreView :

final StateContext stateContext = StateContext.getStateContext(
if (null != state) {
final Application app = context.getApplication();

The code above is here http://pastie.org/1062089

Thx