Take a look at the following non-generic class:
class NonGenericClass(val value: Any) {
fun get(): Any {
return value
}
}
And here is an instance of this class:
val instance: NonGenericClass = NonGenericClass("Hello")
Now we want to get the string back. In which case will the code throw a runtime exception?