instance of kotlin code example
Example 1: kotlin cast types
val myInt: Int = 1.0 as Int
Example 2: kotlin instanceof
if (myInstance is String) {
// DO SOMETHING
}
val myInt: Int = 1.0 as Int
if (myInstance is String) {
// DO SOMETHING
}