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.
If your are taking from HFSJ, then It should be like this:
NO surprise in the o/p: First your adding the attribute so A:a->b Then your replacing the value for the same attribute "a", so P:a->b Finally removing..
I think the problem for you is with P:a->b instead of P:a->c..the getValue() method returns the old value of the attribute if the attribute was replaced [ January 06, 2007: Message edited by: Micheal John ]
SCJP 1.4 (86%), SCWCD 1.4 (86%), SCBCD 1.3 (85%), SCDJWS (Just Started...) - Satisfaction Lies in Our EFFORT, Not in the ATTAINMENT
Thanks for the help, I was dubious about the way attributes work with respect to the above question. Could you tell me where I can find a suitable explanation for the question given on that page in the HFSJ book??