Adding Kotlin to an existing IntelliJ project

Let's start by adding Kotlin to an existing Java project. To get started, walk through the following steps:

  1. Download or check out the code from the following GitHub link: https://github.com/PacktPublishing/Mastering-Kotlin/tree/master/Chapter06.
  2. Open the Chapter06 project with IntelliJ IDEA. Once the project is open in IntelliJ, you should see the following Main.java file with a simple Hello World example:
  1. To verify that it is building correctly, you can click on one of the green arrow icons in the editor and select Run Main.main(). On clicking, you should see Hello World! printed out to the ...

Get Mastering Kotlin now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.