<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Compute on Devops Monk</title><link>https://devops-monk.com/tags/compute/</link><description>Recent content in Compute on Devops Monk</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Mon, 04 May 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://devops-monk.com/tags/compute/index.xml" rel="self" type="application/rss+xml"/><item><title>Collections and Map Enhancements: forEach, merge, compute, replaceAll</title><link>https://devops-monk.com/tutorials/java8/collections-maps/</link><pubDate>Mon, 04 May 2026 00:00:00 +0000</pubDate><guid>https://devops-monk.com/tutorials/java8/collections-maps/</guid><description>Overview Java 8 didn&amp;rsquo;t just add Streams — it also enhanced the existing Iterable, Collection, List, and Map interfaces with default methods that cover the most common imperative patterns. Understanding these methods lets you write cleaner code even without streams.
Iterable.forEach forEach takes a Consumer&amp;lt;T&amp;gt; and applies it to every element:
List&amp;lt;String&amp;gt; names = Arrays.asList(&amp;#34;Alice&amp;#34;, &amp;#34;Bob&amp;#34;, &amp;#34;Charlie&amp;#34;); // Before Java 8 for (String name : names) { System.out.println(name); } // Java 8 names.</description></item></channel></rss>