This week's book giveaway is in the Java in General forum.
We're giving away four copies of Think Java: How to Think Like a Computer Scientist and have Allen B. Downey & Chris Mayfield on-line!
See this thread for details.
Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

From sun java class documents

 
qin da
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The tostring method for class Object returns a string consisting of the name of the class of which the Object is an instance, the at-sign character '@', an the unsigned hexadecimal representation of the hash code of the Object.
 
Chad McGowan
Ranch Hand
Posts: 265
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Right, and you can override toString() in your own classes to return something meaningful.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic