typeof kotlin
val number = 5
if(number is Int) {
println("number is of type Int")
}
println("${number::class.simpleName}") // "Int"
println("${number::class.qualifiedName}") // "kotlin.Int"
typeof kotlin
val number = 5
if(number is Int) {
println("number is of type Int")
}
println("${number::class.simpleName}") // "Int"
println("${number::class.qualifiedName}") // "kotlin.Int"
kotlin check type
// You can use typeof do check data type
fun main() {
val name = "Kotlin for me"
println("${name::class.simpleName}") // "String"
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us