If there any difference between `Java::class.java`...
# android
a
If there any difference between
Java::class.java
and
Java::class
? Why sometime I need to passing the first option as a parameter but sometime I need to pass the second option?
l
::class
is of type
KClass
::class.java
is of type
Class
depending on which your function requires, you need to provide the correct one
👍 2
c
The first one is only available on the JVM platform. It is the
Class<>
you’d normally use for JVM reflection. The second is a
KClass<>
, used for Kotlin-specific reflection, and is available on all platforms (including Native and JS), albeit with limited reflection functionality
👍 5
a
Understand now. Thank you @Luca Nicoletti and @Casey Brooks
l
@Casey Brooks was more specific 😄