deed02392
0
Q:

what is unit type used for in kotlin

/* 
	Unit is used when the function basically return
    nothing of interest
*/

// Example
val MyName = "Johnny"

fun SayHey(): Unit {
	println("Hi, " + MyName)
}

fun main() {
	SayHey()
}
1

New to Communities?

Join the community