- Conveying To the point information for both users(readers) and developers in terms of code
- Following standard protocols and is quite helpful when disabling specific code in case you have to disable it.
- Single-line Comment
- Multi-line Comment
Single line Comment
- They are used at both before and after the statements
- Multi Line comments are represented by Single forward slash (/) with asterik on the interior at both starting and at end.
- This can be used in Single and Multiple line comments both
- Comments must have separate spaces from the source code with different colors if possible
- Comments must be continuous as you move along writing code for fresher perspective simultaneously better understanding towards the project too.
- Their use in Code testing is remarkable by using them in the beginning and ending of the code to check whether the specific code is functioning or not.
- When the code is lengthy with lots of checks these comments becomes the fundamentals for finding bugs and errors respectively. Hence right comments must be added at necessary points.