I tried this, and the code didn\'t compile.
class GenericClass() { private var arr : Array? = null { arr = Array(10,
method
val array : Array = kotlin.arrayOfNulls(size)
from docs
/** *Returns an array of objects of the given type with the given [size], *initialized with null values. */ public fun arrayOfNulls(size: Int): Array