· 3 min read

Master Java Streams and Lambdas: 36 Flashcards from Predicate to groupingBy

Master Java streams and lambdas with Flip It deck BX5387: 36 flashcards on filter, map, reduce, collectors, plus the casing bug and 6 missing cards.

Flat vector illustration of a luminous stream of geometric particles flowing through a glowing funnel among floating flashcards

Studying. But it's also a video game. 🎮

Flashcards, quizzes and games that make you actually remember.

Start playing — it's free

Posted by

Deck BX5387 — Java: Streams and Lambda is 36 flashcards covering the functional half of modern Java: lambda syntax, the four core functional interfaces, every common stream operation, and the collectors you actually reach for. Small enough to finish in two sittings — once you fix one structural flaw.

Study this deck: Java: Streams & Lambda

1 / 10
Question

WORA in Java

Knew itLearning

Tap the card for the answer · swipe right if you knew it, left if not

The 36 cards at a glance

Intermediate operations: filter, map, flatMap, distinct, sorted, limit, skip, peek. Terminal operations: forEach, collect, reduce, count, findFirst, anyMatch. Collectors: groupingBy, partitioningBy, toList, joining. Plus lambda syntax, method references, functional interfaces, Predicate, Function, Consumer, Supplier, Optional, lazy evaluation, parallel streams, parallelStream(), the java.util.stream package, and stream single-use.

Eight representative cards

FrontBack
Functional interfaceAn interface with exactly one abstract method that can be implemented using a lambda expression
Syntax of a lambda expression(parameters) -> expression or (parameters) -> { statements; }
Method reference in JavaA shorthand notation for calling a method, written as ClassName::methodName, that can replace a lambda expression
intermediate vs terminal operationsIntermediate operations are lazy and return a stream; terminal operations trigger computation and return a result
FlatMap in Stream APIAn intermediate operation that flattens nested streams, transforming each element into a stream and concatenating them
PartitioningBy in collectorsA collector that partitions elements into two groups based on a predicate, returning a Map<Boolean, List<T>>
Lazy evaluation in streamsIntermediate operations are not executed until a terminal operation is invoked, optimizing performance
Can you modify a stream after a terminal operation?No, a stream cannot be reused after a terminal operation has been performed on it

Fix the capitalisation before you memorise it

Read the fronts again: ForEach, AnyMatch, FindFirst, FlatMap, GroupingBy, PartitioningBy, ToList, Java.util.stream. Every one of those has been sentence-cased by the deck editor, and Java is case-sensitive — none of them compile. The real names are forEach, anyMatch, findFirst, flatMap, Collectors.groupingBy, Collectors.partitioningBy, Collectors.toList and the package java.util.stream. Fix those eight fronts in your first pass: you are learning identifiers, and a wrong first letter is a wrong identifier.

While you are there, card 1 — WORA in Java (Write Once, Run Anywhere) — belongs to the Java fundamentals deck, not this one. Suspend it here and keep it where it fits.

Add the six cards the deck skips

The coverage is narrow, and the gaps are the ones interviewers probe:

  • allMatch and noneMatch — anyMatch is taught alone, and the three are always tested together.
  • Optional gets a definition card but no orElse, orElseThrow or ifPresent, which is how you actually use it.
  • No IntStream, mapToInt or summaryStatistics — the primitive streams that avoid boxing.
  • Collectors.toMap and Comparator.comparing, both far more common in real code than joining.
  • The effectively final rule: a lambda can only capture a local variable that is never reassigned. Classic exam question, absent here.

One back to soften: the deck says parallel streams give "improved performance" and calls it "automatic parallelization". In practice they share one common ForkJoinPool, and for small collections or IO-bound work they are routinely slower than a plain loop. Rewrite it: "parallel when the work is CPU-bound and the dataset is large; measure first".

This is a vocabulary deck, not a code deck — only the syntax card shows any Java. Add a one-line snippet to each operation card (list.stream().filter(s -> s.length() > 3).toList()) and your recall moves from naming the operation to writing it.

Deck BX5387 "Java: Streams and Lambda" lives in your library on Flip It.

More Java: Study Guide to Java Core Concepts and OOP and How to Memorize the Java Collections Framework.

Ready to learn faster? 🚀

Join FLIP IT for free and turn studying into a game.

Create my free account