Hello Kotlin

The following snippet illustrates several interesting features available in Kotlin:

fun formatName(name: String?) = name ?: "Fellow Human"

fun greetReader(greeting: String = "Hey", name: String?) =
println("$greeting ${formatName(name)}")

fun main(args: Array<String>) {
greetReader("Hello!", "Reader")
// Hello! Reader
}

As you look at these few lines of code, you will notice a few items of interest, which are as follows: