This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Another question for you guys, it from John Meyers' mock test.
The code has compilation error on line 2.
My question is why the compilation pass the line 1? n is a final as well?
Henry Zhi Lin
Joined: Nov 04, 2008
Just had another thought, it pass line one because it change the n's object's x value, but does not change reference n to other object (still point to the old object with x changed). Unlike n, number++ change it reference to other primitive object?
Am I right? [ November 07, 2008: Message edited by: Henry Zhi Lin ]