937 results
Open links in new tab
  1. How to implement a Java stream? - Stack Overflow

    Jun 6, 2015 · This is just an example to show how streams can be defined using Stream.generate () which gives you more flexibility …Read more

  2. using java Stream to get a sum, average, and sort

    Feb 21, 2018 · I am studying java Stream and having hard time solving questions below. The reason why I got stuck is because I …Read more

  3. Java 8 Streams FlatMap method example - Stack Overflow

    Aug 24, 2015 · Returns a stream consisting of the results of replacing each element of this stream with the contents of a mapped …Read more

  4. How can I convert a Java 8 Stream to an Array? - Stack Overflow

    Apr 15, 2014 · If you want to get an array of ints, with values from 1 to 10, from a Stream<Integer>, there is IntStream at your …Read more

  5. How to sum a list of integers with java streams? - Stack Overflow

    May 8, 2015 · The streams classes have multiple forms of general reduction operations, called reduce () and collect (), as well as …Read more

  6. java 8 - Using a stream to iterate n times instead of using a for loop ...

    Jan 22, 2015 · If you know n in advance, I think it's more idiomatic to use one of the stream sources that creates a stream that is …Read more

  7. Java 8 Stream and operation on arrays - Stack Overflow

    Jun 24, 2014 · I have just discovered the new Java 8 stream capabilities. Coming from Python, I was wondering if there was now a …Read more

  8. Sorting a list with stream.sorted() in Java - Stack Overflow

    Aug 12, 2021 · Using Java 8 onward, if you want to do sorting based on some field, you can use some of the static methods inside …Read more

  9. java - Distinct by property - Stack Overflow

    In Java 8, how can I filter a collection using the Stream API by checking the distinctness of a property of each object? For example, I …Read more

  10. java - How can I create a stream from an array? - Stack Overflow

    Jan 11, 2015 · In first example, Java uses method overloading to find specific method based on input types while as in second you …Read more