Initialize an object of a generic class

Report a typo

Initialize an object of the generic class Holder to make the code in the main method compile.

The program should print This is an instance of String.

Sample Input 1:

Sample Output 1:

This is an instance of String
Write a program in Kotlin
class Holder<T>(val value: T) {

fun get(): T {
return value
}
}
fun main() {
// write your code here
val holder: Holder<...> = Holder<...>(...)

// Do not change the code below
val holderValue = holder.get()
print(holderValue)
}
___

Create a free account to access the full topic