About 9,000,000 results
Open links in new tab
  1. How to sum a list of integers with java streams? - Stack Overflow

    May 24, 2021 · 2 Unfortunately looks like the Stream API only returns normal streams from, say, List<Integer>#stream(). Guess they're pretty much forced to because of how generics work.

  2. java - What is InputStream & Output Stream? Why and when do we …

    Java stream is a flow of data from a source into a destination. The source or destination can be a disk, memory, socket, or other programs. The data can be bytes, characters, or objects. The same applies …

  3. Java 8 streams to find the duplicate elements - Stack Overflow

    Dec 28, 2014 · Java 8 streams to find the duplicate elements Asked 10 years, 11 months ago Modified 8 months ago Viewed 279k times

  4. java - Using streams to convert a list of objects into a string ...

    0 I'm going to use the streams api to convert a stream of integers into a single string. The problem with some of the provided answers is that they produce a O (n^2) runtime because of String building. A …

  5. java - Stream and lazy evaluation - Stack Overflow

    Streams are lazy because intermediate operations are not evaluated unless terminal operation is invoked. Each intermediate operation creates a new stream, stores the provided operation/function …

  6. Ignore duplicates when producing map using streams

    Aug 31, 2015 · Ignore duplicates when producing map using streams Asked 10 years, 3 months ago Modified 2 years, 2 months ago Viewed 287k times

  7. Can I duplicate a Stream in Java 8? - Stack Overflow

    Jun 29, 2014 · The Java implementation of the Stream has a great impact on the solution's shape. First impact is related to what happens when data-elements flow through a stream (aka pipe): to actually …

  8. java - Can you explain the concept of streams? - Stack Overflow

    Feb 4, 2009 · In languages such as C#, VB.Net, C++, Java etc., the stream metaphor is used for many things. There are file streams, in which you open a file and can read from the stream or write to it …

  9. java - Should I always use a parallel stream when possible? - Stack ...

    With Java 8 and lambdas it's easy to iterate over collections as streams, and just as easy to use a parallel stream. Two examples from the docs, the second one using parallelStream: myShapesCollec...

  10. java - When should I use streams? - Stack Overflow

    Mar 1, 2017 · 14 The goal of streams in Java is to simplify the complexity of writing parallel code. It's inspired by functional programming. The serial stream is just to make the code cleaner. If we want …