113
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
- Single line comment
- Multiline comment
- 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