Stream Terminal Operations

  • Two kinds of terminal operations on streams: collectors and reducers.
  • The distinction between three similar-sounding things:
    • Collection (interface for a family of data structures, includes List)
    • Collector (interface for operations that turn streams into collections)
    • collect() (method of Stream)
  • What are two differences between collections and streams?
  • What is the role of a terminal operation in a stream?
  • When you do want to use a collector to terminate a stream? When would you want to use a reducer?
  • What kinds of reducers are the most common?

What was particularly interesting, confusing, or exciting to you in this reading?