- Comments are used to write the detailed description about application logics to understand the logics easily.
- Comments are very important in real time because today we are developing the application but that application maintained by some other person so to understand the logics by everyone writes the comments.
- Comments are non-executable code these are ignored at compile time.
There are 3 types of comments.
Single line Comments:-
By using single line comments it is possible to write the description about our programming logics within a single line & these comments are Starts with // (double slash) symbol.
Syntax:- //description
Multi line Comments:-
This comment is used to provide description about our program in more than one line & these commands are start with /* & ends with */
Syntax: – /*—-satement-1
—-statement-2
*/
Documentation Comments:-
By using documentation comments it possible to prepare API(Application programming interface) documents.(e will discuss later chapte)
Syntax: –
/*
*statement-1
*statement-2
*/