Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Beginning Java and the fly likes Class toString 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 "Class toString" Watch "Class toString" New topic
Author

Class toString

aakash bhatt
Ranch Hand

Joined: Jan 09, 2003
Posts: 182
When does toString gets fired even if for Class like Integer, Bigdecial
For an eg: System.out.println("Value is" +varInt);
Does all class can be converted to toString
Regards,
aakash
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8903

There is a toString method in the super class Object. You can override the method to output meaning info pertaining to the object.


Groovy
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Class toString
 
Similar Threads
System.out.print problem
toString()
synchronization issue
print random letters(LinkedList)
regarding DateFormat and calender