Why variables that we don't modify should be final?
Alberto Ivo <[email protected]> Tue, 25 May 2010 16:56:26 -0300
| Newsgroups | gmane.comp.programming.refactoring |
|---|---|
| Message-ID | <[email protected]> |
Hello,
I just passed PMD in my Java code.. and a lot of variables the PMD says that
should be final.. just because I do not modify.
I know that, like this, it's safer because I'm sure that it wil be not
modified ever...
But, besides that, is there another advantage? like performance or anything
else?
Thanks in advance.
Ivo
[Non-text portions of this message have been removed]
------------------------------------
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/refactoring/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/refactoring/join
(Yahoo! ID required)
<*> To change settings via email:
[email protected]
[email protected]
<*> To unsubscribe from this group, send an email to:
[email protected]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/