
上QQ阅读APP看书,第一时间看更新
Java in a Kotlin project
Let's look at an example where we add Java code to an existing Kotlin project using Maven. We previously described the steps to create a Kotlin project in the Configuring Kotlin in your project section. We have created a Maven project in Kotlin using the kotlin-archetype-jvm archetype:

We will add a Java file to it and build the project as follows:

In this section, we have learned how to intermix Kotlin and Java using Maven.