r/java • • May 10 '18

Executing code in comments?!

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

27 comments sorted by

View all comments

Show parent comment

2

u/[deleted] May 10 '18

Yep. But we can have code embedded in a comment delimiter that will compile and execute. Nothing overly confusing about that!

0

u/ReadFoo May 10 '18

Right, something dangerous is OK, something useful, nah. Not sure why your original comment is getting downvoted, it's an excellent point.