A terrific interop experience has been at the core of the Kotlin programming language since the beginning. The language itself was born out of a desire to have modern features while still leveraging existing JVM tools and infrastructure. Because of this, and because of the developer community's desire to reuse existing Java tools and code, Kotlin has progressed while maintaining excellent interoperability with existing Java code bases and tooling.
In this chapter, we'll learn more about the why and how of Kotlin/Java interop, and we'll walk through adding Kotlin to an existing Java project to demonstrate how easy it is to start working with both languages within a single project.
The following topics will be covered in this chapter:
- Understanding why Kotlin was designed with Java interoperability in mind
- How to add Kotlin to an...