Chapter 4. Introducing streams

 

This chapter covers

  • What is a stream?
  • Collections versus streams
  • Internal versus external iteration
  • Intermediate versus terminal operations

What would you do without collections in Java? Nearly every Java application makes and processes collections. Collections are fundamental to many programming tasks: they let you group and process data. To illustrate collections in action, imagine you are tasked to create a collection of dishes to represent a menu to calculate different queries. For example, you may want to find out the total number of calories for the menu. Or, you may need to filter the menu to select only low-calorie dishes for a special healthy menu. But despite collections being necessary for almost any Java application, manipulating collections is far from perfect:

4.1. What are streams?

 
 
 

4.2. Getting started with streams

 

4.3. Streams vs. collections

 
 
 
 

4.4. Stream operations

 
 

4.5. Road map

 
 
 

Summary

 
 
sitemap

Unable to load book!

The book could not be loaded.

(try again in a couple of minutes)

manning.com homepage
test yourself with a liveTest