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
starlyn reyes32 Points
how to to do this method with LinkedList<I> , head and tail
boolean addSorted(I obj) This method is called to add the specified object to the list in sorted order. More specifically, the objects preceding the specified object must be "less than" the specified object, and the objects following the specified object must be "greater that or equal to" the specified object. Parameters: obj - A reference to the obj being added, in sorted order, to the list. All objects being added to the list must implement the Comparable interface. Returns: Returns true if the object was successfully added at the given index. If the given index is invalid, this method returns false, indicating that the specified object was not added to the list. See Also: Comparable