This week's book giveaway is in the Mac OS forum. We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line! See this thread for details.
Can someone provide clarification of the toString method and overriding it in classes to print "meaningful" information? I have been asked to implement the toString method in classes but can only find a paragraph on this method in 2 different books. Any additional/practicle information would be appreciated.
Mitch, By default the toString() method outputs a hash representing the memory address. Often, we overwrite this to contain useful information about the state of the object (such as the values of it's fields.) As an example,