Comments

Comments are used to embed text in the source file that is to be ignored by the compiler. This could include reminders, raging profanity, and helpful pointers as to the purpose of a particular piece of code. The two types of comments are single-line comments and multi-line comments.

Single-line comments

Single-line comments are prefixed by two forward slashes (//) and span one line of the source file.

// This is a single-line comment!
// This is another!
// I like trains

Multi-line comments

Multi-line comments are prefixed with a forward slash and an asterisk (/*), any combination of characters and are then closed by an asterisk and a forward slash (*/). These span any number of lines (the limit is positive infinity).

/* 
  Comment line 1
  Comment line 2
  Comment line 3 
*/

The useage of comments is encouraged as a way of venting inevitable anger and ensuring that your code's complexity is explained in a readable manner.