Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialAtul Varma
4,285 PointsLittle help here.. Anyone ??
I want to clarify whether I am on right path here ..
Recalling some previous code, treet was a message from Craig Dennis seondTreet was a message from journeyToCode
Craig made an array of treets = [treet, secondTreet]
so, In the code below:
Treet originalTreet = treets[0];
here, we are getting the array of [a message from Craig Dennis] ..right ? and then we are storing it in originalTreet..right ?
1 Answer
gyorgyandorka
13,811 PointsYes, exactly. Just to be clear, the message by Craig is a treet
type object, the first item of the treets
array. And the term "storing" in this context actually means that we are assigning another "pointer" to this object (with the name originalTreet
), by which we can reference it instead of treet
or treets[0]
.
Atul Varma
4,285 PointsAtul Varma
4,285 PointsNo, but when I ran it, the "Treets.ser" file, (command --- cat Treets.ser), the messge which he has uploaded in the treets is different now(some other message with lot of hash tags). Then how come, only #treet pop-out as an output ?
gyorgyandorka
13,811 Pointsgyorgyandorka
13,811 PointsCould you please share the full code, or at least the part which gives you the confusion (I'm a little lost, it was a while ago that I've been doing this course)? (See the Markdown Cheatsheet link below the text box for formatting it properly.)
Atul Varma
4,285 PointsAtul Varma
4,285 Pointshttps://w.trhou.se/pep9rjb4sr