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.
b is a local variable to the modify method. By changing b to point to a, you are doing nothing to the b in the main method. Try it by changing the variable names in the modify method to c and d to perhaps make it a bit clearer. Look at this code:
When you understand this code, grasshopper, you will have reached a deeper understanding of pointers.
Nmurar01, the answer "A,B" is correct. In modify method, if you make changes to objects' values then the changes would be visible in main method, but if you make changes to objects' reference, these changes will not be visible in calling method. Best regards, -Asif
Now I understand the meaning of early birds catch the worm. Moderators
Joined: Mar 11, 2002
Hello Moderators, I had this question on my exam only variable names were different and the modify method included additional append call between the variables. Early birds still managed to eat the worms???
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com