N
N
Newbie Ivanovich2020-06-04 17:56:21
Kotlin
Newbie Ivanovich, 2020-06-04 17:56:21

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

2 answer(s)
I
illuzor, 2020-06-04
@NovichokIvanovich

You cannot create an array of indefinite length in Kotlin. So any array will be of a certain length.

E
Enerdgazer, 2021-03-09
@Enerdgazer

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 question

Ask a Question

731 491 924 answers to any question