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

"Oh no! We encountered an error with your last submission."

Why am I getting an error? My code outputs exactly the same as the printChipmunksImperatively method, and I'm using a "forEach" to get my result. Is this because this course is wildly out of date? How can I get credit for this when I don't even know what I'm doing wrong?

Here's what I've got:

  public static void printChipmunksDeclaratively(List<String> chipmunks) {
    // TODO: Print out each of the chipmunks using the forEach method on Iterable
    chipmunks.forEach(chipmunk -> System.out.printf("%s! %n", chipmunk));

  }