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![](https://ecs-static.teamtreehouse.com/assets/views/marketing/shared/community-banner-white-47072046c51352fe6a69f5e691ff5700b28bb11d45197d7bdf066d9ea3f72d0c.webp)
![liamthornback2](https://secure.gravatar.com/avatar/87eba8a70f1b18274eaa6a68c6859f47?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
liamthornback2
9,618 PointsWorkspaces don't support Java 8+ streams?
I'm trying to use a stream to print out all of the words in the description and it is not working (code below):
import java.util.stream;
//...
blogPost.getDescriptionWords.stream().forEach(System.out::println);
This is the error I'm getting:
Example.java:2: error: cannot find symbol
import java.util.stream;
^
symbol: class stream
location: package java.util
Example.java:10: error: cannot find symbol
blogPost.getDescriptionWords().stream().forEach(System.out::println);
^
symbol: method stream()
location: class String[]
2 errors
UPDATE:
I solved the problem. My mistake was treating an array like it was a list. Here is what I should have done:
import java.util.Arrays;
//...
Arrays.stream(blogPost.getDescriptionWords()).forEach(System.out::println);
Also, I didn't need to import "java.util.stream", I guess streams are just in Java by default now.