Hi Paul:
 
I suggest u use Object.getClass().getName(), Object.hashCode() to track a runtime object, cos toString() is very useful some time, like System.out.println("This is my object: "+myObject+", can u see it?"), or Hashtable.toString(), StringBuffer.toString(), java.sql.Date.toString(), org.apache.turbine.service.db.util.Criteria.toString()... They're all useful or even necessary sometime. This is my opinion.
 
 
 
Regards
 
joe
 
Peter,

Re recent diffs....

Generally I am against overriding toString() in classes.  The only way
you can get the true object reference for debugging is to do a toString
: "org.apache.Thing@a3b2c3"  That is useful when you are hunting
problems with multiple instances of a thing or the wrong instance of
thing.  Of course I am talking of traditional debugging  -
System.out.println("blah blah " + m_thing).  By overriding toString()
that is not longer possible.  Perhaps another method name for what you
are trying to do?  "String debug()"

- Paul


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Get more from the Web. FREE MSN Explorer download : http://explorer.msn.com

Reply via email to