Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
The Mikado Method
this week in the
Agile and other Processes
Joined: Sep 08, 2008
Sep 29, 2008 01:06:00
why programmeres overriding toString() method? where it is really usefull in projects?.i have seen this a lot of times in
Joined: Feb 19, 2008
Sep 29, 2008 01:15:00
"toString" in one shot gives you a short description about an object !! It may print an important state of your object, which comes handy in displaying an object .
If your printing some objects , you can show some user understandable message by overriding 'toString()' method, rather than printing its hashcode values !
[Freelance Web Designer]
[and "Rohan" is part of my surname]
I agree. Here's the link:
- if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
subject: overriding toString()
how to load the values in one object?
Overloading and Overriding
why new date() prints date ?????
Object of class having toString() method
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2013