What is the result of the following code execution:
val box: Box<String> = Box<String>("")
box.set(10L)
Here, Box is a generic class:
class Box<T> (var value: T) {
fun set(newValue: T) {
value = newValue
}
}What is the result of the following code execution:
val box: Box<String> = Box<String>("")
box.set(10L)
Here, Box is a generic class:
class Box<T> (var value: T) {
fun set(newValue: T) {
value = newValue
}
}Create a free account to access the full topic