how to call a java function called `to` from Kotli...
# getting-started
p
how to call a java function called
to
from Kotlin? it keeps trying to use the
Pair
extension 🤔
y
use an import alias like this:
import <http://com.javaCode.to|com.javaCode.to> as javaTo
p
@Youssef Shoaib [MOD] wicked!
it won't let me import that 🤔 ..
Kotlin: Cannot import 'to', functions and properties can be imported only from packages or objects
y
hmmm, make sure you fully qualify it i.e. with the full package like this
import <http://com.example.x.y.z.to|com.example.x.y.z.to> as javaTo
d
maybe you need to backtick it `import package.
to
as javato` ? (I've no idea if it works)
n
or `javaInstance.`to`(arg)`
âž• 1