Javatpoint Logo
Javatpoint Logo

Go Comments

The Go comments are not executed by the compiler and interpreter. The comments are used to provide information or explanation about the method, variable, class or any statement. It can also be used to hide program code for specific time.

Go Single Line Comment

The double forward slash "//" is used for the single-line comment.

Go Single Line Comment Example:

Output:

10

Go Multi Line Comment

A multi-line or block-comment starts with /* and ends with */. Here, nesting is not allowed.

Go Multi Line Comment Example:

Output:

10

Next TopicGo Constants





Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA