Skip to content

mkyong.com

  • Spring Boot
  • Java Virtual Threads
  • Contact
  1. Home /
  2. exception handling

Tag: exception handling

java8 August 20, 2015 8 min read by mkyong 21 comments

Java 8 forEach examples

In Java 8, we can use the new forEach to loop or iterate a Map, List, Set, or Stream. Topics Loop a Map Loop a List forEach and Consumer forEach and Exception handling forEach vs forEachOrdered 1. Loop a Map 1.1 Below is a normal way to loop a Map. public static void loopMapClassic() { […]

Read more Java 8 forEach examples

Recent Posts

  • Java Compact Source File: No Class, No Static Main
  • Java Scoped Values Example
  • Spring Boot RAG Example with Spring AI
  • Java AtomicInteger Example
  • Java Virtual Threads Example
  • Spring Boot Supabase CRUD Example
  • Spring Boot REST Docs Example
  • How to Install Java on Windows (Step-by-Step Guide)

© 2008–2026 mkyong.com

  • About
  • Editorial Policy
  • Contact
  • Code License
  • Privacy Policy
  • Terms of Use