Consider the following generic class:
class MyClass<T>(val t: T) {
fun get(): T {
return t
}
}
What will happen if you create an instance without specifying the type argument?
val instance = MyClass("Hello!")Consider the following generic class:
class MyClass<T>(val t: T) {
fun get(): T {
return t
}
}
What will happen if you create an instance without specifying the type argument?
val instance = MyClass("Hello!")Create a free account to access the full topic