Programming for fun and profit

Programming tutorials, problems, solutions. Always with code.

Java 8 Streams and Lambda Expressions Tutorial

Java Streams and Lambda Expressions Tutorial explores the newest additions to Java 8. The tutorial contains practical examples of how to use Stream API, Lambdas, and method refereneces to solve common problems.

Java 8 fundamentals

Stream functions

  • Building Streams
    Find out how to create Streams in common and not so common ways.
  • flatMap in action
    How to use Stream.flatMap() to simplify processing of tree-like structures!
  • Reduce by example
    All Java 8 Stream.reduce() methods explained on examples!

Collectors

IntStream – stream of primitive integers

Share with the World!