aboutsummaryrefslogtreecommitdiff
path: root/examples/maven/src/main/kotlin/HelloWorld.kt
blob: 172e18f7cfbf4f0a76b80228a8a872fdddbef4fa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
package demo

/**
 * This class supports greeting people by name.
 *
 * @property name The name of the person to be greeted.
 */
class Greeter(val name: String) {

    /**
     * Prints the greeting to the standard output.
     */
    fun greet() {
        println("Hello $name!")
    }
}

fun main(args: Array<String>) {
    Greeter(args[0]).greet()
}