ePrivacy and GPDR Cookie Consent by CookieConsent.com

Comments in dart

Comments are used in dart programming for explaining the dart code so that the code becomes more readable to you and other developers.
There are three types of comments in the dart language.
  1. Single line comments
  2. Multi-line comments
  3. Doc comments

Single line comment

Single line comment in dart language is used or commenting on a single line.  
Single line comment starts with  //  .
All the codes between   //   and the end of the line will be ignored means not be executed.
An example of single-line comment in the dart programming language is the following.

Here is an example of a single-line comment that explains the code

Multi-line comment

A multi-line comment is used for commenting multiple lines of code or multiple lines of code conversations. 
A multiline comment starts with  /*  and ends with  */  . Whatever comes inside these, are commented.

Doc comments

Doc comment in the dart programming language is used for documenting the codes. Doc comment in dart start with   ///   there is another way to create Doc comment which starts with  /**  and ends with  */  . But nowadays the first method is mostly used.  The dart compiler ignores all the things inside the comments.

*    *    *