Can you mix Kotlin with Java?

Even if it’s interop you can’t mix Java and Kotlin in the same file . If you really want to have static methods/variables you can use an companion object . You can also access create a “real” static method in your JVM by using @JvmStatic . By using @JvmStatic you can use Java to access your Static methods like before.

Sizin İçin Seçtik  How is Kotlin so fast?

Leave a Reply

Your email address will not be published. Required fields are marked *

Can you mix Kotlin with Java?

Even if it’s interop you can’t mix Java and Kotlin in the same file . If you really want to have static methods/variables you can use an companion object . You can also access create a “real” static method in your JVM by using @JvmStatic . By using @JvmStatic you can use Java to access your Static methods like before.

Sizin İçin Seçtik  22 ayar 20 gram altın kaç TL?

Leave a Reply

Your email address will not be published. Required fields are marked *