2

I have this code:

class ABCD
{
    public static void main (String[] args)
    {
        int i = 3;
        // \u000A i++;
        System.out.println(i);
    }
}

Ouput:

4

Does this mean that Java also executes comments?

NineBerry
  • 26,306
  • 3
  • 62
  • 93
dryairship
  • 6,022
  • 4
  • 28
  • 54
  • The line break represented by \u000A terminates the line comment. See http://stackoverflow.com/questions/4448180/why-does-java-permit-escaped-unicode-characters-in-the-source-code – NineBerry Apr 03 '16 at 13:40

1 Answers1

2

The i++ is on a separate line from the one-line comment. Unicode code point '\u000A' is a line-feed character.

sisyphus
  • 6,174
  • 1
  • 25
  • 35