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

Java and Spring tutorials since 2008. Every example is a complete, runnable file, compiled and run on a real machine before it goes out.

About This Site

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

© 2026 mkyong.com — Powered by WordPress

RSS