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 The Solution

Denis Hirschhorn
Denis Hirschhorn
673 Points

Purpose of Cow class

Hi Guys, I'm at a loss as to how the Cow class/constructor interacts with the for loops in Arrays.java.

I see how

getName

is used, but I don't understand why the rest of the code in the Cow class has to be there.

Can anyone break this down for me?