Is it true that the only equivalent to the Java st...
# getting-started
j
Is it true that the only equivalent to the Java statement
Copy code
new Object[][] = {{ "foo", "bar" }, { 1, 2 }}
in Kotlin is
Copy code
arrayOf(arrayOf( "foo", "bar" ), arrayOf( 1, 2 ))
with the obvious implications for N-dimensional arrays?
v
👍 1
Except when you are configuring annotation property values, there a literal exists already.
e
as a temporary measure until then, you could
Copy code
import kotlin.arrayOf as a
a(a("foo", "bar"), a(1, 2))