Content deleted Content added
m Noted common instance where final keyword does not accomplish what is expected. |
m typo |
||
Line 95:
Since the obj variable goes out of scope with each iteration of the loop, it is actually redeclared each iteration, allowing the same token (i.e. <code>obj</code>) to be used to represent multiple variables.<ref>{{cite web|url=http://www.cs.cmu.edu/~pattis/15-1XX/15-200/lectures/morejava/lecture.html|title=More Java|last=Pattis|first=Richard E.|work=Advanced Programming/Practicum 15–200|publisher=School of Computer Science [[Carnegie Mellon University]]|accessdate=23 July 2010}}</ref>
Although it also appears to break the intent of final variables, modifying the value from another class (by getting the reference via a
<code>package test;</code>
|