Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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));

  }