r/programming • • May 10 '18

Java: Executing code in comments?!

http://programming.guide/java/executing-code-in-comments.html
260 Upvotes

84 comments sorted by

View all comments

Show parent comments

-2

u/[deleted] May 11 '18

If you can read you'd understand I am saying the code is literally in the comment. I have other comments stating why it makes zero sense to decode the above and shows they're doing it wrong

3

u/recursive May 11 '18

Java compilers follow a specification, not what reddit posters say makes sense.

0

u/[deleted] May 12 '18

I'm not saying Java is doing something other than what it does. I'm saying not only does it make no sense it's doing what it is doing poorly and wrong

2

u/recursive May 12 '18

Correctness is defined by the spec.

0

u/[deleted] May 12 '18 edited May 12 '18

If the spec said + is subtraction and * is addition noone would say it's correct. Just like noone says only allowing one null in a unique column is a good idea (One of SQL Server biggest complaints)

→ More replies (0)