23 Java Interoperability
There are many reasons to learn Kotlin. For Java developers, for example, Kotlin offers a more modern and safe language for existing projects. If that is you, we hope you are inspired to use Kotlin to improve your Java projects.
Many other developers who learn Kotlin will use it in projects that are written 100% with Kotlin. But even for these developers, the need to interoperate with Java still comes up. You may work with a framework that was written in Java, for example, or use a library that has expectations about the structure of your program’s output. Being aware of these concerns can be extremely helpful when getting yourself out of tricky situations.
Up to this point in the book, you have been using ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access