Can I be part of the code in Java and elsewhere with Kotlin? Can anyone tell me?
Can I be part of the code in Java and elsewhere with Kotlin? Can anyone tell me?
Yes, you can. It is a feature spurred by Google that the new language of Android be interoperable with Java; you can create a class in Java and another in Kotlin, each one will be compiled into a .class
file, and one can call the other in the code (Kotlin call Java or Java call Kotlin).
You can even adopt Kotlin gradually in your Java code, that is, exchange a Java class with the same class written in Kotlin, and so on.
Examples: