Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Comments //

 
Chatura Dilan
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have heard that I can put anything after the comments // and compiler will ignore it.
Example:

Amazing! Compiler does not ignore this



I do not know why?
 
Arno Reper
Ranch Hand
Posts: 286
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
its because // \u000A is like // ( \u000A ) and \u000A is the unicode value for 'return carriage' so the compiler understand this

arno
 
Chatura Dilan
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OK Thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic