newObjectArray
context(env: JniEnv)
fun newObjectArray(length: Int, elementClass: JClass, initialElement: JObject? = null): JObjectArray?(source)
fun newObjectArray(length: Int, elementClass: JClass, initialElement: JObject? = null): JObjectArray?(source)
Constructs a new array holding objects in class elementClass. All elements are initially set to initialElement.
Return
a Java array object, or null if the array cannot be constructed.
Parameters
length
array size; must be >= 0.
elementClass
array element class.
initialElement
initialization value.
Throws
if the system runs out of memory.