«« Next » « Previous
Subversion
Written by: Lorna Jane Mitchell
Featured Refcardz: Top Refcardz:
  1. Git
  2. DNS
  3. Data Mining
  4. Spring Data
  5. Subversion
  1. Spring Data
  2. Subversion
  3. Spring Config.
  4. Spring Annotations
  5. Data Mining

Link Details

Link 543761 thumbnail
User 448255 avatar

By dotCore
via dreamincode.net
Published: Jan 12 2011 / 21:16

The toString() method solves so many question that we see these days in the forums, and it is crucially important to understand it. It is a method that is defined in the Object class and thus, every object has one, however, it prints out, for the most part, meaningless information.
  • 7
  • 0
  • 1611
  • 3

Comments

Add your comment
User 776377 avatar

lburnham123 replied ago:

0 votes Vote down Vote up Reply

Summary: override toString() to provide a string representation of an object.

User 405399 avatar

saifuddin.merchant replied ago:

0 votes Vote down Vote up Reply

I guess its more of a tip/tutorial for beginners - I would have loved to see a mention of org.apache.commons.lang.builder.ToStringBuilder - specifically the http://commons.apache.org/lang/api-2.5/org/apache/commons/lang/builder/ReflectionToStringBuilder.html

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.

Voters For This Link (7)



Voters Against This Link (0)