This week's book giveaway is in the OCMJEA forum. We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara 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 ]