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 Lists Java Lists Java Lists Quiz

How to declare racks variable as a list of Rocks ?

I want to understand what i am doing wrong in this task. My solutions was List<String> List<Rocks> List<> Nothing works. Thanks for help

1 Answer

Jennifer Nordell
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

Hi there, Tomek Skrent! It's wanting you to create a list of Rock instances. So for this you would need List<Rock>. Each item in the list is a single rock. The list of rocks is appropriately named rocks :smiley:

Hope this helps! :sparkles: