Kotlin Comments Example
Chapter:
Kotlin
Last Updated:
11-11-2017 18:09:01 UTC
Program:
/* ............... START ............... */
fun main(args : Array<String>) {
//This is single line comment
/* This is
multi line
comment */
/**
This
is
documentation
comment
*/
println("Kotlin - Hello World ")
}
/* ............... END ............... */
Notes:
-
As like Java, there are thee types of comments in Kotlin.
- 1. Single Line Comment
- 2. Multi Line Comment
- 3. Documentation Comment
- The single line comment is used to comment only one line.
- The multi line comment is used to comment multiple lines of code.
- The documentation comment is used to create documentation API.
- In the above program you can see all three comments.
Tags
Comment Example , Kotlin