Skip to main content
Post Closed as "Duplicate" by Tom, Tunaki java
edited title
Link
NineBerry
  • 28.8k
  • 4
  • 68
  • 104

Java output is not correct Code inside comment executed after Unicode sequence

Source Link
dryairship
  • 6.1k
  • 4
  • 32
  • 57

Java output is not correct

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?