Working with Java Streams

In 2014, Oracle released Java 8, which included significant upgrades, including introducing the streams API. Streams are significant to Java because they greatly simplify everyday programming tasks related to working with collections.

Updated

What is a Stream?

  1. What is a Stream?: an overview (Apprentice): A data stream is like a water stream, where data flows from a source to a destination and the stream exists only between them.
  2. Data in Transit vs Data at Rest (Apprentice): Stored data is at rest, and data moving between places, such as over a network or from a query, is in transit.
  3. Extract Transform Load (Apprentice): ETL (Extract, Transform, Load) takes data from a source, reshapes it in a series of small steps, and stores it at a destination.
  4. Working with Java Streams (Journeyman): A Java stream works like ETL for in-memory data, taking a collection, transforming it step by step, then collecting the result.
  5. Common Stream Functions (Journeyman): Use the common stream functions forEach, filter, map, distinct and reduce to process a list without writing loops.
  6. Sorting, Cutting and Checking Streams (Journeyman): Put a list of objects in order, cut it into pages, and ask it yes-or-no questions with the stream functions Java developers use every day.
  7. Counting, Collecting and Flattening Streams (Journeyman): Count, total, join, group and flatten a list of objects with streams, and read any stream as intermediate steps followed by one terminal step.