Skip to content

Latest commit

 

History

History
30 lines (20 loc) · 1016 Bytes

File metadata and controls

30 lines (20 loc) · 1016 Bytes

Hello World

Prerequisites

  • IntelliJ (IDE)

Instructions

  1. Create a new Kotlin JVM project in IntelliJ: File -> New -> Project. On the left, make sure Java is selected, then select Kotlin/JVM under Additional Libraries and Framework. Press Next. Skip the next page, then name your project and set where the project is saved.

  2. Once your project loads, click the dropdown on your project folder. Right click the src folder and select New -> Kotlin File/Class. Name the file HelloWorld

  3. Write a method called main. The body of the method should print Hello World onto the console when the program is run. You can run the program by clicking the green triangle next to your method.

Results

Try it yourself before looking at these!

Code
fun main() {
    println("Hello World")
}
Console Output
Hello World

Process finished with exit code 0