Chapter 8

  1.  Interoperability refers to the ability to use both Java and Kotlin languages in a single project. We can call Kotlin functions in Java, as well as Java methods and variables in Kotlin code. This gives us the advantage of code reusability. For example, if we have an existing Java project with classes and functions, then we do not need to rewrite everything in Kotlin from scratch. Instead, we can use each and every line of Java code in Kotlin.
  2. JVM annotations are used to make the Kotlin code simple and clean for Java developers. @file: JvmName helps us to use another Kotlin filename. jvmName(functionName) is used to assign a new name to the existing function, and @JvmStatic helps to call static functions from Kotlin.
..................Content has been hidden....................

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