In the example above? There is no reason to be happy or sad. It literally is a byte mess. Having any "reasonable" assumptions based on the non-readable form about it is absurd. Is a hexdump of a valid program absurd? No, it is not. Of course it will compile, it is just another encoding.
It is not a hex dump nor is it another encoding. I would be far more forgiving if it were.
This is the compiler swapping in unicode values when it sees \uxxxx . These are not unicode values. These sorts of "helps" are awful for a language. Especially since you can have UTF-8 source code with java. Which means, in a UTF-8 file you can throw in \uxxxx escapes.
This is nasty for the same reason trigraphs in C++ are a bad idea.
33
u/rigatron1 May 10 '18 edited May 10 '18
+/u/CompileBot Java