43-Java 8 Features Stream Flat Map

Java 8 Streams Return collects by using Stream API

Similar Posts

4 thoughts on “43-Java 8 Features Stream Flat Map
  1. It's a good explanation of the FlatMap purpose. But also that's not the way you should use streams, never generate innecesary intermediate streams variables. The forEach in the first example should have been applied directly on the chaining, actorStream should not exist. Same for fruitsAndVeggies. It's a bad anti-pattern.

  2. we can use Flatmap when we need to cast Streams from type to other such as
    Stream<String[]> to Stream<String>
    Stream<List<String>> to Stream<String>
    Stream<List<Object>> to Stream<Object>
    and more types

  3. Hello Sir,
    Nice video..
    Could you please explain MovieUtil , what is this exactly in Java..after the class FlatMap line..
    what is it significance in this program?

Leave a Reply

Your email address will not be published. Required fields are marked *