You will get a stream of streams, like [... ["y", "o", "u", "r"], ["b", "o", "a", "t"], ...]
To flatten it out to a stream of letters [... "y", "o", "u", "r", "b", "o", "a", "t", ...],
use the flatMap method instead of map.
java 8 理解flatmap
最新推荐文章于 2024-05-21 10:57:43 发布