I asked this question about Java streams, and it got 2 downvotes, which isn't terrible, but still confusing. There are no close votes or comments about what I did wrong, and in my (probably biased) opinion, it's a great question, since I've put in the output I expected, the output I got, and the code I used.
I wrote the question because it seems to be a common mistake to leave out terminal operations in streams (I and people I know have made this mistake a few times before, and I saw a similar question), and I was hoping someone would post a good, canonical answer so that people wouldn't have to waste time looking for the answer to their problem if they didn't know that streams had to be terminated.
Is there any way I can edit the question to make it better? I certainly can't delete it now, as there are multiple upvoted answers, one of whom I've accepted. I doubt it'll get much attention on Stack Overflow now that I've accepted an answer, so I decided to ask here. Let me know if I can do something to improve this (current) question or the other one.