Mixing Java and Kotlin in one project

Mixing Java and Kotlin in one project

Last Updated 23 September 2014
This tutorials walks us through the process of using Java and Kotlin in a single IntelliJ IDEA project.

We'll be using IntelliJ IDEA (Ultimate or Community edition). If using build tools, please see the corresponding entry under Build Tools. To understand how to start a new Kotlin project using IntelliJ IDEA, please see the Getting-Started tutorial.

Adding Java source code to an existing Kotlin project

To add a new Java class to a Kotlin project is very straightforward. All we need to do is create a new Java file (Ctrl+N/Cmd+N) in the correct folder/package.

New Java Class登录查看完整内容