Skip to main content

Java interoperability and gradual migration

Simple idea

Kotlin and Java compile to JVM bytecode and can coexist in one Android module. The difficult parts are not calling methods; they are nullability, properties, default arguments, checked exceptions, generics, SAM interfaces, and maintaining a stable API for both languages.

Chapter pages​

  1. Calling Java from Kotlin
  2. Calling Kotlin from Java
  3. Gradual migration and Android architecture
  4. Interop corner cases and interviews