1/9
Flashcards for reviewing the concept of streams in Java, including basic stream operations, lambda expressions, and parallel streams.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
Streams
A way to iterate through an entire collection of elements in a data structure.
Java Streams
A feature introduced in Java 8 that is specifically used on collections to iterate through data structures.
stream()
The method used to create a stream from a collection.
forEach()
A method to process each element in a stream.
Lambda Expression
A compact way to represent a method in Java, often used with streams.
Functional Interface
An interface with a single abstract method, allowing it to be used with lambda expressions.
Consumer Interface
A functional interface that represents an operation to be performed on a single input argument.
Parallel Stream
Utilizes multiple cores of the CPU to process a stream, potentially improving performance through parallel execution.
Asynchronous Process
A stream that may not process elements in the original order due to multi-threading.
parallelStream()
A stream created by calling the method parallelStream() on a collection.