<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Method-References on Devops Monk</title><link>https://devops-monk.com/tags/method-references/</link><description>Recent content in Method-References 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/method-references/index.xml" rel="self" type="application/rss+xml"/><item><title>Method References: Four Kinds and When to Use Each</title><link>https://devops-monk.com/tutorials/java8/method-references/</link><pubDate>Mon, 04 May 2026 00:00:00 +0000</pubDate><guid>https://devops-monk.com/tutorials/java8/method-references/</guid><description>What Are Method References? A method reference is a compact syntax for a lambda expression that does nothing except call an existing method. If a lambda&amp;rsquo;s entire body is a method call, a method reference is almost always clearer.
// Lambda names.forEach(s -&amp;gt; System.out.println(s)); // Method reference — identical behaviour, fewer characters, clearer intent names.forEach(System.out::println); The :: operator is the method reference operator. It does not call the method — it creates a reference to it, which the compiler wraps into a lambda that calls the method.</description></item></channel></rss>