Answer the question
In order to leave comments, you need to log in
How to create an empty array of a certain length in kotlin?
How to create an empty array of a certain length in kotlin?
Answer the question
In order to leave comments, you need to log in
You cannot create an array of indefinite length in Kotlin. So any array will be of a certain length.
int[] a = new int[10]; java
val a = IntArray(10) kotlin
String[] e = new String[]; java
val e: Array = arrayOfNulls() kotlin
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question