<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Coder Legion - Recent posts tagged comments-in-java</title>
<link>https://coderlegion.com/tag/comments-in-java</link>
<description>Powered by Question2Answer</description>
<item>
<title>Unicode escape trick</title>
<link>https://coderlegion.com/6226/unicode-escape-trick</link>
<description>&lt;p&gt;&lt;strong&gt;A simple Unicode escape trick&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Do you think the following Java code can compile correctly?&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;public class HelloWorld {
    public static void main(String[] args) {
// This is the first single line comment \u0009\u000a\u000c\u002f\u002a#######
# This is between two single line comments
# How is this line getting compiled?
# The lines between the two single line comments are being treated like comment, why?
# I don't think # is a comment in java.
// This is the second single line comment  \u0009\u000a\u000c #### \u002a\u002f
        System.out.println(&quot;Hello world!&quot;);
    }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Please comment to explain why this code compiles.&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/6226/unicode-escape-trick</guid>
<pubDate>Thu, 09 Oct 2025 07:24:11 +0000</pubDate>
</item>
</channel>
</rss>