Javatpoint Logo
Javatpoint Logo

Scala Comments

The scala comments are statements which are not executed by the compiler or interpreter. The comments can be used to provide information or explanation about the variable, method, class or any statement. It can also be used to hide program code details.

In scala, there are three types of comments

  1. Single line comment
  2. Multiline comment
  3. Documentation comment

Scala Single Line Comment Example

Single line comment is used to comment single line of code.

Output:

1

Scala Multiline Comment

Multiline comment is used to comment multiple lines of code in the program.

Output:

1

Scala Documentation Comment Example

Output:

1
Next TopicScala Functions





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