---
title: "Discussion on \"Java Interview question-17\" | Hashnode"
description: "Discussion on \"Java Interview question-17\". Question 161: Difference between map and flat map\n\nmap is used to transform each element of a collection independently and returns a new collection with the transformed elements.\n\nflatMap is used to transform each element of a collection into a seque..."
url: "https://hashnode.com/posts/java-interview-question-17/6534f27d6a414907f3a8bd9a"
---

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

Discussion

# [Java Interview question-17](https://tusharkant.hashnode.dev/java-interview-question-17?utm_source=hashnode&utm_medium=feed)

Question 161: Difference between map and flat map map is used to transform each element of a collection independently and returns a new collection with the transformed elements. flatMap is used to transform each element of a collection into a seque...

Oct 22, 2023 · 9 min read · tusharkant.hashnode.dev  
Read the article

-   [#java](https://hashnode.com/tag/java)
-   [#springboot](https://hashnode.com/tag/springboot)
-   [#microservices](https://hashnode.com/tag/microservices)

## Written by

[Tushar kant](https://hashnode.com/@tusharkant)

@tusharkant

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

Java || SpringBoot ||AWS

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
