Is it possible to access extension functions from Java code?
I defined the extension function in a Kotlin file.
package com.test.extensions
import c
It works for me:
Kotlin
Java code
My project is an old android project created with Java; now I created the first kotlin file and added String extensions fun String.isNotNullOrEmpty(): Boolean {... }
and I could call it from java file using: StringUtilsKt.isNotNullOrEmpty(thestring).
My kotlin file name is StringUtils