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

163

u/kking254 May 10 '18

Actually executing code NOT in comments.

0

u/[deleted] May 10 '18

[deleted]

90

u/spacejack2114 May 10 '18
// \u000d App.initialize();
// Don't remove! ^ This comment is needed for some reason???

22

u/zergling_Lester May 10 '18

You can put it into what looks like a string literal even. As an example of sanitising unprintable characters, for example.