jeudi 15 juin 2017

Kotlin language get class at runtime

Let's say that we have the following:

val person = "Bill"

Could someone explain the difference between these two:

val kClass1 = person.javaClass.kotlin

vs

val kClass2 = person::class

When I should call the one instead of the other?





Aucun commentaire:

Enregistrer un commentaire