Start by indenting your code for Streams differently. Every method call goes on a new line and indent it so all the . operators align vertically. So your code will readDon't write all the code until you are more experienced. Write it bit by bit and compile after every line. As I said earlier, use an IDE to give you information about the resultant type of the expression on every line. If you hover the mouse on the words stream filter and map, you will get a popup box or tooltip with details of the method and the current return type.
Paul Peterson wrote:. . . I tried writing the stream like this, but kept getting that lovely little red !