About 50 results
Open links in new tab
  1. 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 …

  2. How to implement a Java stream? - Stack Overflow

    The JDK's standard implementation of Stream is the internal class java.util.stream.ReferencePipeline, you cannot instantiate it directly. Instead you can use java.util.stream.Stream.builder(), …

  3. 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 …

  4. Retrieving a List from a java.util.stream.Stream in Java 8

    Here firstly I converted my ArrayList to steam them using filter I filter out required data. Finally I have used collect method of java 8 stream to collect data in new list called as targetLongList.

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

    May 8, 2015 · 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.

  6. Java 8: How do I work with exception throwing methods in streams?

    Java 8: How do I work with exception throwing methods in streams? Asked 11 years, 11 months ago Modified 7 years, 5 months ago Viewed 308k times

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

    Dec 28, 2014 · Java 8 streams to find the duplicate elements Asked 11 years, 3 months ago Modified 1 year ago Viewed 280k times

  8. java - Can you split a stream into two streams? - Stack Overflow

    Mar 19, 1994 · A stream should be operated on (invoking an intermediate or terminal stream operation) only once. This rules out, for example, "forked" streams, where the same source feeds two or more …

  9. 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 …

  10. Alternative to peek in Java streams - Stack Overflow

    Dec 14, 2022 · There are lots of questions regarding peek in the Java Streams API. I'm looking for a way to complete the following common pattern using Java Streams. I can make it work with Streams, …