https://kotlinlang.org logo
y

Yugandhar

02/13/2020, 6:48 AM
What is the difference between arrayof and IntArrayof and intArrayOf in kotlin
a

Antoine Gagnon

02/13/2020, 2:00 PM
arrayOf will create an array in Kotlin without a specified type intArrayOf will create an array in Kotlin that holds Java int type elements
z

Zach Klippenstein (he/him) [MOD]

02/13/2020, 3:26 PM
intArrayOf
will create an
int[]
(array of integer primitives), whereas
arrayOf<Int>
creates an
Integer[]
(array of boxed Integer objects)