Kotlin Comments

 package com.example.myapplication


fun main(args: Array<String>)
{
// This is single line comment and I have shown simple "Hello World" as shown below
println("Hello world!") // This is also a single line comment

/* A multi-line comment in Kotlin starts with /* and end with */. So any text written in
between /* and */ will be treated as a comment and will be ignored by Kotlin compiler.
Multi-line comments also called Block comments in Kotlin.*/

/* This is a multi-line comment, and it can span
* as many lines as you like */
println("Above shown is multi-line comments")

/* This is a multi-line comment, and it can span
* as many lines as you like
/* This is a nested comment */
// Another nested comment
*/
println("Above shown is kotlin nested comments")
}

OUTPUT :

Hello world! Above shown is multi-line comments Above shown is kotlin nested comments Process finished with exit code 0

Comments