wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes about toString() method Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "about toString() method" Watch "about toString() method" New topic

about toString() method

Shaan patil
Ranch Hand

Joined: Dec 22, 2007
Posts: 58
Hi all,

We all know that , string class is declared a final. Then how is it possible to override the toString method in the throwable class ?

"You cannot change the truth but truth can change you "
Phani Burra
Ranch Hand

Joined: Dec 13, 2007
Posts: 52
The Throwable class doesn't override the toString() method of the String class but it overrides the toString() method of the Object class.
Shaan patil
Ranch Hand

Joined: Dec 22, 2007
Posts: 58
Hi Phani Burra ,

You are right , The toString() method of the "Object" class is overridden in the Throwable class.

I agree. Here's the link: http://aspose.com/file-tools
subject: about toString() method
Similar Threads
Why I get the List content when I print the List object?
toString method confusion.
What's the difference in this case? (so basic)
ArrayList class