Re: question about the toString Method
- From: "Art Cummings" <aikiart7@xxxxxxxxx>
- Date: Fri, 28 Dec 2007 10:59:47 -0500
You call
System.out.println(myCourse), which calls
String.valueOf(myCourse), which calls
myCourse.toString(), which returns a String to
String.valueOf(myCourse), which returns the same String to
System.out.println(myCourse), which then calls
System.out.print(theString), which returns to
System.out.println(myCourse), which eventually returns to
You.
--
Eric Sosman
esosman@xxxxxxxxxxxxxxxxxxxx
Thanks Eric,
I think I follow what you're saying. My Java intermediate course is
starting in a couple of weeks. I'm wondering at what point concepts like
this are introduced. Is this a graduate level understanding? The text by
Tony Gaddis, Starting out with Java, is pretty good, but it drives me crazy
when he leaves out explanations of this type. I'm wondering whether it's
better just to accept what's happening, at my level, or to dig deeper. I
definitely feel that sometimes the ideas have to sit for awhile before they
just seem to gell.
Thanks again
This was pretty clear.
Art
.
- Follow-Ups:
- Re: question about the toString Method
- From: Mark Space
- Re: question about the toString Method
- From: Eric Sosman
- Re: question about the toString Method
- References:
- question about the toString Method
- From: Art Cummings
- Re: question about the toString Method
- From: Eric Sosman
- question about the toString Method
- Prev by Date: Re: when will Tuple be std?
- Next by Date: Re: Help with packages getting started
- Previous by thread: Re: question about the toString Method
- Next by thread: Re: question about the toString Method
- Index(es):