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!
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
Rashadat Mirzayev14,601 Points
I do not get the method
in this line: List<Treet> authoredTreets = treetsByAuthor.get(treet.getAuthor());
getAuthor() only get the author not the treet, wright? it suppose to put author of the treet to authoredTreets?
Omar AminCourses Plus Student 1,194 Points
The first getAuthor() method returns the author of the treet. The second get method which is invoked by the treetsByAuthor map returns the value associated with the key (in this case the returned author). This returned value (which is the treet) will be put in the authoredTreets list. It might be null if the author is not in the treetsByAuthor map. I hope you got it.