---
title: "Discussion on \"Stream in Java (with examples)\" | Hashnode"
description: "Discussion on \"Stream in Java (with examples)\". Learn how to use the Stream API in java (with examples)."
url: "https://hashnode.com/posts/stream-in-java-with-examples/611bbc21888ca15f5d391f7e"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Stream in Java (with examples)](https://techwithmaddy.com/stream-in-java-with-examples?utm_source=hashnode&utm_medium=feed)

Learn how to use the Stream API in java (with examples).

Aug 17, 2021 · 4 min read · techwithmaddy.com  
Updated Oct 21, 2023  
Read the article

-   [#java](https://hashnode.com/tag/java)
-   [#stream](https://hashnode.com/tag/stream)
-   [#functional-programming](https://hashnode.com/tag/functional-programming)
-   [#java-programming](https://hashnode.com/tag/java-programming)
-   [#java-beginner](https://hashnode.com/tag/java-beginner)

## Written by

[Maddy](https://hashnode.com/@Maddy25)

@Maddy25 · London, UK

  
[View profile](https://hashnode.com/@Maddy25)

Technical Writer @ Cloudflare

Software engineer turned technical writer.

## Responses 2

Markdown supported · ⌘↵ to post

[YMY Bimali](https://hashnode.com/@LightFury)

[Jan 3, 2023](https://hashnode.com/posts/stream-in-java-with-examples/611bbc21888ca15f5d391f7e/comment/63b47127f50de375e168feee)

Great article Maddy. Thank you for your effort ♥️ I have this concern when it is said there can be one terminal operation and terminal operations cannot be chained. we can write something like this right? Isn’t this chaining collect and forEach which are both terminal operations. I don’t get that part 🤔 Stream1.map().collect().forEach()
