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.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset