Comments are parts of your code that are ignored by the compiler. They are a useful way of writing information in your program code. For instance if a programmer wanted to remember exactly how his algorithm works or what it is used for he
would write a short comment. Comments are especially important when writing large programs.
In general there are two types of comments; single line comments and multi-line comments.
Example:
//This method draws the space ship
{This program is used to rotate a sprite.
The sprite must be a bitmap for the program
to work}
Note: The actual code used for comments can vary from language to language.
|