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 Introduction to Functional Programming Reduction and Aggregation Using a Range to Produce a Menu

Ioannis Bouramas
Ioannis Bouramas
12,583 Points

Reduction and Aggregation Last Exercise. Does not even run imperatively.

So far I have executed the exercises, but this one does not print anything out. It just prints:

Imperatively: Declaratively:

Has anybody managed to solve it successfully?

Ioannis Bouramas
Ioannis Bouramas
12,583 Points

My mistake. I was filtering out all the non-empty strings while I should do exactly the opposite.