Why is executing Java code in comments with certain Unicode characters allowed?
The following code produces the output “Hello World!” (no really, try it). public static void main(String… args) { // The comment below is not a typo. // \u000d System.out.println(“Hello World!”); } The reason for this is that the Java compiler parses the Unicode character \u000d as a new line and gets transformed into: public static … Read more