<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Javadoc on TheJavaGuy Blog 🚀</title>
    <link>/tags/javadoc/</link>
    <description>Recent content in Javadoc on TheJavaGuy Blog 🚀</description>
    <generator>Hugo</generator>
    <language>en</language>
    <copyright>Copyright © 2016-2026 Ivan Milosavljević. All Rights Reserved.
</copyright>
    <lastBuildDate>Thu, 28 Apr 2022 00:00:00 +0000</lastBuildDate><atom:link href="/tags/javadoc/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>New in Java 18: Code snippets in Javadoc (part 2)</title>
      <link>/posts/007-new-in-java-18-code-snippets-in-javadoc-part-2/</link>
      <pubDate>Thu, 28 Apr 2022 00:00:00 +0000</pubDate>
      <guid>/posts/007-new-in-java-18-code-snippets-in-javadoc-part-2/</guid>
      <description><![CDATA[<p>In the <a href="/posts/003-new-in-java-18-code-snippets-in-javadoc-part-1/">part 1</a> we&rsquo;ve seen how we can use inline snippets in Javadoc and how to control their appearance with regions and highlighting. While such usage should be enough for a lot of use-cases, from time to time we&rsquo;ll need more power, for example to include snippets with block comments. In such cases, external snippets come to the rescue. Let&rsquo;s see how to use them!</p>]]></description><enclosure url="/posts/007-new-in-java-18-code-snippets-in-javadoc-part-2/cover.png" length="81741" type="image/png" />
    </item>
    
    <item>
      <title>New in Java 18: Code snippets in Javadoc (part 1)</title>
      <link>/posts/003-new-in-java-18-code-snippets-in-javadoc-part-1/</link>
      <pubDate>Thu, 24 Mar 2022 00:00:00 +0000</pubDate>
      <guid>/posts/003-new-in-java-18-code-snippets-in-javadoc-part-1/</guid>
      <description><![CDATA[<p>As Java developers our job is not only to write working code but also to document it properly. Since its beginnings Java provided us with the <code>javadoc</code> tool which generates this documentation from the specially formatted <em>documentation comments</em> we wrote in the source code. In these documentation comments we use various <em>tags</em> to document parameters, return values, exceptions thrown etc. It is often the case that we must include a code snippet to show intended usage of our code. Until Java 18 we relied on the <code>@code</code> tag, perhaps in combination with <code>&lt;pre&gt;…&lt;/pre&gt;</code> if we needed multi-line snippets. But now we have a better way and that is by using new <code>@snippet</code> tag. Let&rsquo;s see its basic usage in action!</p>]]></description><enclosure url="/posts/003-new-in-java-18-code-snippets-in-javadoc-part-1/cover.png" length="97989" type="image/png" />
    </item>
    
  </channel>
</rss>

