# Java 9: Enhancements to the Stream API

DevFeed: [Java 9: Enhancements to the Stream API](<https://devfeed.tech/articles/java-9-enhancements-to-the-stream-api-21499.md>)

Original publisher: [Read original article](<https://mirocupak.com/java-9-enhancements-to-the-stream-api/>)

Published: 2017-11-10T03:28:40Z

Content type: tutorial

Language: en

Sources: [Miro Cupak](<https://devfeed.tech/sources/miro-cupak.md>)

Topics: [Java](<https://devfeed.tech/topics/java.md>), [API](<https://devfeed.tech/topics/api.md>)

Tags: [code](<https://devfeed.tech/tags/code.md>), [filter](<https://devfeed.tech/tags/filter.md>), [infinite](<https://devfeed.tech/tags/infinite.md>), [java](<https://devfeed.tech/tags/java.md>), [java-9](<https://devfeed.tech/tags/java-9.md>), [new-features](<https://devfeed.tech/tags/new-features.md>), [streams](<https://devfeed.tech/tags/streams.md>)

## AI overview

This tutorial explains four Java 9 enhancements to the Stream API, including predicate-based take and drop operations and an overloaded iterate method. It uses JShell examples to compare the additions with Java 8 approaches, including handling conditions over infinite streams.

## Source excerpt

In the last post in this series, we took a look at the new convenience factory methods for collections in Java 9. Collections play well with the Stream API, which learned a few new tricks since its introduction in Java 8 as well. There are 4 particularly exciting new features - let's explore them with JShell!