Title here
Summary here
Our first program will print the classic “hello world” message. Here’s the full source code.
To run the program, put the code in a file with a .kt
extension, such as hello-world.kt
, and use the Kotlin compiler to run it.
Sometimes we’ll want to build our programs into binaries that can be executed directly. In Kotlin, you can create an executable JAR file.
First, compile the code and then package it into a JAR file:
We can then execute the JAR file directly using the java -jar
command.
Now that we can run and build basic Kotlin programs, let’s learn more about the language.