Skip to content
Mkyong.com
Mkyong.com
  • Development Service
  • Spring Boot
  • Java 8
  • Contact

map filter

Java 8 Map filter examples

March 13, 2024February 23, 2016 by mkyong

This article shows a few examples of filtering a Map by its keys or values using the Java 8 stream APIs. Table of contents: 1. Java Map filter (Classic) 2. Java Map filter (Java 8) 3. Java Map filter (Java 8 Predicate) 4. References 1. Java Map filter (Classic) Before Java 8, we looped the …

Read more

Categories java8 Tags java.util, java8, map filter, predicate, stream filter 2 Comments

How to loop Map in Java

March 13, 2024June 25, 2010 by mkyong

This article show few ways of loop Map in Java. 1. Using entrySet() 2. Using forEach (Java 8 and later) 3. Using stream() (Java 8 and later) 4. Using iterator() 5. Using keySet() and get() 6. References 1. Using `entrySet()` Before Java 8, this is the most common method to loop a Map in Java. …

Read more

Categories java Tags java.util, java8, loop map, map, map filter Leave a comment

Mkyong.com has provided Java and Spring tutorials, guides, and code snippets since 2008. All published articles are simple, easy to understand, and well-tested in our development environment.

Mkyong.com licenses all source code on this website under the MIT License.

Tools
  • Spring Framework
  • Quarkus Framework
  • Micronaut Framework
  • Oracle Java JDK
  • Eclipse Temurin JDK
  • OpenJDK JDK
  • Hibernate ORM
  • Maven Build Tool
  • Gradle Build Tool
  • Tomcat Application Server
  • Docker
Links
  • Spring Guides
  • Docker Hub
  • Maven Central
  • Keep A Changlog
  • Semantic Versioning
  • Hugging Face - Qwen
  • Martin Fowler
About
  • About Us
  • Code License
  • Privacy Policy
  • Terms Of Use
  • Contact Us
© 2026 Mkyong.com - Build with Love.