{"id":46826,"date":"2026-11-25T22:08:30","date_gmt":"2026-11-25T22:08:30","guid":{"rendered":"https:\/\/www.devopsschool.com\/blog\/?p=46826"},"modified":"2026-11-25T22:08:30","modified_gmt":"2026-11-25T22:08:30","slug":"groovy-tutorials-how-to-write-comments-in-groovy","status":"publish","type":"post","link":"https:\/\/www.devopsschool.com\/blog\/groovy-tutorials-how-to-write-comments-in-groovy\/","title":{"rendered":"Groovy Tutorials: How to write comments in Groovy?"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Groovy has three kinds of comment that it shares with Java: single-line comments with <code>\/\/<\/code>, block comments between <code>\/*<\/code> and <code>*\/<\/code>, and GroovyDoc comments between <code>\/**<\/code> and <code>*\/<\/code>. Groovy scripts can also start with a shebang line. This page shows each form with examples, then covers the mistakes people make most often (nested block comments, <code>#<\/code> comments, comment markers inside strings), how comments behave in Jenkinsfiles, and how to turn GroovyDoc comments into HTML documentation.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Single-Line Comments<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Single-line comments start with \/\/ and extend to the end of the line. They are typically used for brief explanations or notes.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-1\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\"><span class=\"hljs-comment\">\/\/ This is a single-line comment<\/span>\nprintln(<span class=\"hljs-string\">\"Hello, World!\"<\/span>) <span class=\"hljs-comment\">\/\/ This prints a message to the console<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-1\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Multiline Comments<\/h2>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"wp-block-paragraph\">Multiline comments, also known as block comments, begin with \/* and end with *\/. They can span multiple lines and are useful for providing detailed explanations or documentation.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-2\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\"><span class=\"hljs-comment\">\/*\n  This is a multiline comment in Groovy.\n  It can span multiple lines and is useful\n  for documenting complex logic or providing\n  detailed explanations.\n*\/<\/span>\n\n<span class=\"hljs-comment\">\/\/ Example usage in a function:<\/span>\ndef exampleFunction() {\n    <span class=\"hljs-comment\">\/* This is a multiline comment\n       inside a function. It can explain\n       what the function does or document\n       important information.\n    *\/<\/span>\n    println(<span class=\"hljs-string\">\"This function does something.\"<\/span>)\n}<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-2\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Documentation Comments<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Groovy also supports documentation comments, which are a form of multiline comments used to generate documentation. These comments start with \/** and end with *\/. They are processed by tools like GroovyDoc to create API documentation.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-3\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php\"><span class=\"hljs-comment\">\/**\n * This is a documentation comment.\n * It is used to describe the purpose and behavior\n * of a class, method, or field in detail.\n *\n * <span class=\"hljs-doctag\">@param<\/span> name The name of the user\n * <span class=\"hljs-doctag\">@return<\/span> A greeting message\n *\/<\/span>\ndef greetUser(name) {\n    <span class=\"hljs-keyword\">return<\/span> <span class=\"hljs-string\">\"Hello, ${name}!\"<\/span>\n}<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-3\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"wp-block-paragraph\">Best Practices<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-4\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\">\u2022   Use Comments Sparingly: Write clear and concise code that doesn\u2019t rely heavily on comments <span class=\"hljs-keyword\">for<\/span> understanding.\n\u2022   Keep Comments Updated: Ensure comments are updated along <span class=\"hljs-keyword\">with<\/span> the code changes to avoid confusion.\n\u2022   Document Public APIs: Use documentation comments to describe public methods, classes, and fields, especially <span class=\"hljs-keyword\">in<\/span> libraries and frameworks.<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-4\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Groovy comment types at a glance<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The examples above show the three main comment styles. The table below lists all four comment forms Groovy recognises and what the compiler does with each one.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Syntax<\/th><th>Name<\/th><th>Where it is allowed<\/th><th>What the compiler does<\/th><\/tr><\/thead><tbody><tr><td><code>\/\/ text<\/code><\/td><td>Single-line comment<\/td><td>Anywhere outside a string, through to the end of the line<\/td><td>Ignores it<\/td><\/tr><tr><td><code>\/* text *\/<\/code><\/td><td>Block (multiline) comment<\/td><td>Anywhere outside a string, including in the middle of a line<\/td><td>Ignores it<\/td><\/tr><tr><td><code>\/** text *\/<\/code><\/td><td>GroovyDoc comment<\/td><td>Directly before a class, interface, trait, method, field or property<\/td><td>Ignores it, but the <code>groovydoc<\/code> tool reads it<\/td><\/tr><tr><td><code>#!\/usr\/bin\/env groovy<\/code><\/td><td>Shebang line<\/td><td>Only on the very first line of a script<\/td><td>Ignores it, so Unix shells can run the script directly<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">A runnable script using every comment type<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Save the following as <code>comments.groovy<\/code>. It uses every comment form, so you can confirm that none of them change what the script does.<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-5\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\"><span class=\"hljs-meta\">#!\/usr\/bin\/env groovy<\/span>\n<span class=\"hljs-comment\">\/\/ comments.groovy - demonstrates every Groovy comment style<\/span>\n\n<span class=\"hljs-comment\">\/**\n * Builds a greeting for a user.\n *\n * <span class=\"hljs-doctag\">@param <\/span>name the user's name\n * <span class=\"hljs-doctag\">@return <\/span>the greeting text\n *\/<\/span>\n<span class=\"hljs-built_in\">String<\/span> greetUser(<span class=\"hljs-built_in\">String<\/span> name) {\n    <span class=\"hljs-keyword\">return<\/span> <span class=\"hljs-string\">\"Hello, ${name}!\"<\/span>   <span class=\"hljs-comment\">\/\/ GString interpolation<\/span>\n}\n\n<span class=\"hljs-comment\">\/*\n  The block below is disabled for now.\n  println \"This line never runs\"\n*\/<\/span>\n\ndef total = <span class=\"hljs-number\">10<\/span> <span class=\"hljs-comment\">\/* inline block comment *\/<\/span> + <span class=\"hljs-number\">5<\/span>\nprintln greetUser(<span class=\"hljs-string\">'DevOps'<\/span>)\nprintln <span class=\"hljs-string\">\"Total: ${total}\"<\/span>\nprintln <span class=\"hljs-string\">\"URL: https:\/\/groovy-lang.org\"<\/span>   <span class=\"hljs-comment\">\/\/ the \/\/ inside the string is not a comment<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-5\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-6\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php\">$ groovy comments.groovy\nHello, DevOps!\nTotal: <span class=\"hljs-number\">15<\/span>\nURL: https:<span class=\"hljs-comment\">\/\/groovy-lang.org<\/span>\n\n<span class=\"hljs-comment\"># Or, using the shebang line on Linux\/macOS:<\/span>\n$ chmod +x comments.groovy\n$ .\/comments.groovy<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-6\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\">Some points to notice. The block comment in the middle of <code>10 \/* ... *\/ + 5<\/code> is removed before the expression is evaluated, so <code>total<\/code> is 15. The <code>\/\/<\/code> inside <code>&quot;https:\/\/groovy-lang.org&quot;<\/code> belongs to the string, because comment markers have no effect inside string literals. The shebang line only works when it is the very first line of the file, with nothing before it, not even a blank line.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Common mistakes and how to fix them<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Mistake<\/th><th>What happens<\/th><th>Fix<\/th><\/tr><\/thead><tbody><tr><td>Nesting block comments: <code>\/* outer \/* inner *\/ still outer *\/<\/code><\/td><td>The first <code>*\/<\/code> closes the comment, so <code>still outer *\/<\/code> is parsed as code and compilation fails<\/td><td>Use <code>\/\/<\/code> on each line, or remove the inner <code>\/* *\/<\/code> before wrapping the block<\/td><\/tr><tr><td>Using <code>#<\/code> as a comment (shell or Python habit)<\/td><td>Compilation error, because <code>#<\/code> only counts as a comment in a first-line shebang<\/td><td>Use <code>\/\/<\/code> instead<\/td><\/tr><tr><td>Forgetting to close <code>\/*<\/code><\/td><td>The rest of the file is treated as comment text and the compiler reports an error at the end of the file<\/td><td>Add the missing <code>*\/<\/code>, and let your IDE&#039;s syntax highlighting show where the comment ends<\/td><\/tr><tr><td>Commenting out only one half of a brace pair<\/td><td>A <code>{<\/code> or <code>}<\/code> no longer has its partner, which gives confusing errors on later lines<\/td><td>Comment out whole blocks, or use the IDE&#039;s block-comment command on a complete selection<\/td><\/tr><tr><td>Writing <code>*\/<\/code> inside a block comment, for example in a glob like <code>src\/**\/*.groovy<\/code><\/td><td>The <code>*\/<\/code> in the path ends the comment early<\/td><td>Use <code>\/\/<\/code> comments for text that contains <code>*\/<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Note:<\/strong> In IntelliJ IDEA, <code>Ctrl+\/<\/code> (<code>Cmd+\/<\/code> on macOS) toggles line comments and <code>Ctrl+Shift+\/<\/code> (<code>Cmd+Option+\/<\/code> on macOS) toggles a block comment. Line comments are the safer choice when you disable code, because they never nest incorrectly.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Comments in Jenkinsfiles<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Both declarative and scripted Jenkins pipelines are written in Groovy, so the same comment rules apply. A common use is temporarily disabling a stage with a block comment:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-7\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php\">pipeline {\n    agent any\n    stages {\n        stage(<span class=\"hljs-string\">'Build'<\/span>) {\n            steps {\n                <span class=\"hljs-comment\">\/\/ Compile and package the application<\/span>\n                sh <span class=\"hljs-string\">''<\/span><span class=\"hljs-string\">'\n                    # This is a shell comment inside the sh string\n                    mvn -B clean package\n                '<\/span><span class=\"hljs-string\">''<\/span>\n            }\n        }\n        <span class=\"hljs-comment\">\/*\n        stage('Deploy') {\n            steps {\n                sh '.\/deploy.sh'\n            }\n        }\n        *\/<\/span>\n    }\n}<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-7\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\">Inside the <code>sh &#039;&#039;&#039;...&#039;&#039;&#039;<\/code> string, the text is a shell script, so comments there must use the shell&#039;s <code>#<\/code> syntax. A <code>\/\/<\/code> inside that string is passed to the shell unchanged, and the shell will try to run it as a command. Outside the string, in the Groovy code, <code>#<\/code> is not valid. Because a block comment ends at the first <code>*\/<\/code>, check that a commented-out stage does not contain <code>*\/<\/code>, for example in a file pattern such as <code>archiveArtifacts &#039;target\/**\/*.jar&#039;<\/code>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Generating documentation from GroovyDoc comments<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">GroovyDoc comments use Javadoc-style tags such as <code>@param<\/code>, <code>@return<\/code>, <code>@throws<\/code>, <code>@see<\/code>, <code>@since<\/code> and <code>@deprecated<\/code>. GroovyDoc is designed for classes and their members, so put documented code in classes when you want the API pages to be useful. Script-level methods like the one in the example above end up in a generated script class.<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-8\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\"><span class=\"hljs-comment\">\/\/ src\/main\/groovy\/com\/example\/Greeter.groovy<\/span>\npackage com.example\n\n<span class=\"hljs-comment\">\/**\n * Creates greeting messages.\n *\n * <span class=\"hljs-doctag\">@since <\/span>1.0\n *\/<\/span>\n<span class=\"hljs-class\"><span class=\"hljs-keyword\">class<\/span> <span class=\"hljs-title\">Greeter<\/span> <\/span>{\n\n    <span class=\"hljs-comment\">\/** Text placed before the name. *\/<\/span>\n    <span class=\"hljs-built_in\">String<\/span> prefix = <span class=\"hljs-string\">'Hello'<\/span>\n\n    <span class=\"hljs-comment\">\/**\n     * Builds a greeting for a user.\n     *\n     * <span class=\"hljs-doctag\">@param <\/span>name the user's name, must not be empty\n     * <span class=\"hljs-doctag\">@return <\/span>the formatted greeting\n     * <span class=\"hljs-doctag\">@throws <\/span>IllegalArgumentException if name is empty\n     *\/<\/span>\n    <span class=\"hljs-built_in\">String<\/span> greet(<span class=\"hljs-built_in\">String<\/span> name) {\n        <span class=\"hljs-keyword\">if<\/span> (!name) <span class=\"hljs-keyword\">throw<\/span> <span class=\"hljs-keyword\">new<\/span> IllegalArgumentException(<span class=\"hljs-string\">'name is required'<\/span>)\n        <span class=\"hljs-string\">\"${prefix}, ${name}!\"<\/span>\n    }\n}<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-8\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\">You can generate HTML with the <code>groovydoc<\/code> command that ships with the Groovy distribution, or with Gradle&#039;s <code>groovy<\/code> plugin, which adds a <code>groovydoc<\/code> task.<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-9\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php\"><span class=\"hljs-comment\"># Command line: write HTML docs for the com.example package into .\/docs<\/span>\ngroovydoc -d docs -sourcepath src\/main\/groovy com.example\n\n<span class=\"hljs-comment\"># Gradle (with plugins { id 'groovy' } in build.gradle)<\/span>\n.\/gradlew groovydoc\n<span class=\"hljs-comment\"># Output: build\/docs\/groovydoc\/index.html<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-9\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\"><strong>Note:<\/strong> Groovy 3 and later also support runtime GroovyDoc. A comment that starts with <code>\/<strong>@<\/code> can be attached to the class or method and read at runtime through its <code>groovydoc<\/code> property. This is off by default and is turned on with the JVM option <code>-Dgroovy.attach.runtime.groovydoc=true<\/code>. Most projects never need it, but it explains the unusual <code>\/<\/strong>@<\/code> syntax if you come across it.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Practical commenting guidelines<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The best practices above are a good starting point. The following points make them more concrete:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Explain why, not what.<\/strong> <code>\/\/ retry because the artifact repo returns 503 during reindexing<\/code> is useful. <code>\/\/ increment i<\/code> is not.<\/li>\n\n\n<li><strong>Delete dead code instead of commenting it out<\/strong> once it is in version control. Git keeps the history, and large commented-out blocks hide the real logic.<\/li>\n\n\n<li><strong>Mark unfinished work consistently<\/strong> with <code>\/\/ TODO:<\/code> or <code>\/\/ FIXME:<\/code> so IDEs and linters such as CodeNarc can find it.<\/li>\n\n\n<li><strong>Never put secrets in comments.<\/strong> Credentials or tokens in a commented-out line are still in the repository and its history. In Jenkins, use the credentials store.<\/li>\n\n\n<li><strong>Document every public class and method<\/strong> in shared libraries, such as Jenkins shared libraries under <code>src\/<\/code>, because other teams depend on that API.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Frequently asked questions<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Does Groovy support # comments?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">No. The only place <code>#<\/code> is accepted is a shebang line such as <code>#!\/usr\/bin\/env groovy<\/code> on the first line of a script. Anywhere else, use <code>\/\/<\/code> or <code>\/* *\/<\/code>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Can I nest multiline comments in Groovy?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">No. A block comment ends at the first <code>*\/<\/code>, so any text after the inner comment is parsed as code and compilation usually fails. Use <code>\/\/<\/code> on each line when you comment out code that already contains a block comment.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">How do I comment out multiple lines in a Jenkinsfile?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Wrap the lines in <code>\/*<\/code> and <code>*\/<\/code>, or prefix each line with <code>\/\/<\/code>. Inside <code>sh<\/code> script strings, use the shell&#039;s <code>#<\/code> comments instead, because that text is run by the shell, not by Groovy.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">What is the difference between \/* *\/ and \/** *\/ in Groovy?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The compiler ignores both. The <code>\/** *\/<\/code> form is a GroovyDoc comment, which the <code>groovydoc<\/code> tool reads to build HTML API documentation when the comment sits directly before a class, method, field or property.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">How do I generate GroovyDoc HTML documentation?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Run <code>groovydoc -d docs -sourcepath src\/main\/groovy &lt;package&gt;<\/code> from the command line. In a Gradle project that applies the <code>groovy<\/code> plugin, run <code>.\/gradlew groovydoc<\/code> and open <code>build\/docs\/groovydoc\/index.html<\/code>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Related tutorials<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/www.devopsschool.com\/blog\/category\/programming\/\">More Programming &amp; Development tutorials<\/a><\/li>\n\n\n<li><a href=\"https:\/\/www.devopsschool.com\/blog\/top-50-scala-interview-questions-and-answers\/\">Top 50 Scala Interview Questions And Answers<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Groovy has three kinds of comment that it shares with Java: single-line comments with \/\/, block comments between \/* and *\/, and GroovyDoc comments between \/** and&#8230; <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_joinchat":[],"footnotes":""},"categories":[26151],"tags":[437],"class_list":["post-46826","post","type-post","status-publish","format-standard","hentry","category-programming","tag-groovy"],"_links":{"self":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/46826","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/comments?post=46826"}],"version-history":[{"count":2,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/46826\/revisions"}],"predecessor-version":[{"id":80252,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/46826\/revisions\/80252"}],"wp:attachment":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media?parent=46826"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/categories?post=46826"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/tags?post=46826"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}