Welcome to Dream.In.Code
Getting Java Help is Easy!

Join 136,235 Java Programmers for FREE! Get instant access to thousands of Java experts, tutorials, code snippets, and more! There are 2,244 people online right now. Registration is fast and FREE... Join Now!




The toString method?

 
Reply to this topicStart new topic

The toString method?

bsq935
13 Oct, 2008 - 09:23 AM
Post #1

New D.I.C Head
*

Joined: 2 Oct, 2008
Posts: 33


My Contributions
Does it not print anything out? What does it do exactly?
I couldn't find any good explanation online rolleyes.gif
User is offlineProfile CardPM
+Quote Post

bsq935
RE: The ToString Method?
13 Oct, 2008 - 09:34 AM
Post #2

New D.I.C Head
*

Joined: 2 Oct, 2008
Posts: 33


My Contributions
Ohhh.. There's a tutorial for it in the forum FAQ tongue.gif Sorry, disregard!
User is offlineProfile CardPM
+Quote Post

carman69
RE: The ToString Method?
13 Oct, 2008 - 10:07 AM
Post #3

New D.I.C Head
*

Joined: 19 Aug, 2008
Posts: 20



Thanked: 1 times
My Contributions
QUOTE(bsq935 @ 13 Oct, 2008 - 10:23 AM) *

Does it not print anything out? What does it do exactly?
I couldn't find any good explanation online rolleyes.gif



you can get class and method descriptions at sun.com/api
User is offlineProfile CardPM
+Quote Post

kawczynski
RE: The ToString Method?
13 Oct, 2008 - 10:34 AM
Post #4

New D.I.C Head
*

Joined: 23 Jun, 2008
Posts: 18



Thanked: 3 times
My Contributions
Output of the toString method depends on the class that implements it. If the class doesn't have its own implementation, you can expect something fairly useless (in the form of the name of the class plus the object instance identifier). Custom classes can leverage custom implementations of this method, so their object's toString method outputs something relevant to the purpose of that custom class.
User is offlineProfile CardPM
+Quote Post

bsq935
RE: The ToString Method?
13 Oct, 2008 - 05:47 PM
Post #5

New D.I.C Head
*

Joined: 2 Oct, 2008
Posts: 33


My Contributions
Thank you!
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 12/2/08 03:29AM

Live Java Help!

Java Tutorials

Reference Sheets

Java Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month