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 trial

Java Java Data Structures - Retired Getting There Class Review

2 Answers

"Treet" is Treehouse's way of saying "Treehouse Tweet". It's a little funny since it sounds like "Treat" Lol.

~Alex

No problem.

I completely get why the actual file name is "Treet", and where that made up word came from. As Craig Dennis explained in the prior video, a "Treet" is a "portmanteau". Meaning, you take parts of one word, and combine them with parts of another word to form a new word. Here, and with this, the instructor used part of "Tweet" (from Twitter) and part of "Treehouse" to form this new word.

However, this prompted me to ask another question that I have been picking up on lately, and I wonder if the instructor is just using the method he is for possible ease of learning, or if it is some sort of "accepted" standard of doing something. Take a look at the code following:

Treet treet = new Treet();

I have noticed in multiple projects on here that I see those things like that being repetitive. I understand that statement to be constructing a new Treet object. In all the other courses, I would see that repetition of the same word and just thought it was syntax, but reading the Constructor documentation on Oracle, the second (and all lower cased) "treet" is actually a variable name for the new Treet object that is being constructed. Basically, that you could say "myTreetIsCooler" and it would still work fine. It is just a name.

I don't know if it was explained or not that that was basically a variable name for the object that is being constructed, but I had no idea until I saw it in the Oracle documentation. Am I tracking this, and understanding what the Oracle documentation is saying correctly, and/or is there some sort of industry accepted way of doing things like this to keep things repetitive?

Atefe Mosayebi
Atefe Mosayebi
6,868 Points

Hey, Michael. You understand it correctly! treat is the name for the new instance of the Class Treet. each instance of a class is an object. I remember Craig mentioned this in Java Object course!