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.
The moose likes Beginning Java and the fly likes toString() Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Java » Beginning Java
Bookmark "toString()" Watch "toString()" New topic


sandeep Talari
Ranch Hand

Joined: Dec 24, 2007
Posts: 63
How many purposes are there for toString().One I know is to give meaning to an object, despite getting any ununderstandable code.
Tell me other uses.
Campbell Ritchie

Joined: Oct 13, 2005
Posts: 43933
Isn't that enough for it to do? I trust you have read about it in the Object class?
Santhosh Kumar
Ranch Hand

Joined: Nov 07, 2000
Posts: 242
toString() has one and only intention is to give a meaning human understandable String to an Object.
Have you checked out Aspose?
subject: toString()
It's not a secret anymore!