Kotlin - Data Types
What will be the output of this Kotlin code?
fun printAny(value: Any) {
when(value) {
is String -> println("String: $value")
is Int -> println("Int: $value")
else -> println("Unknown type")
}
}
printAny(10)
printAny("hello")
printAny(3.14)