A

Admin • 833.24K Points
Coach

Q. What is the correct way to declare an array in Kotlin?

  • (A) array[1, 2, 3]
  • (B) Array(1, 2, 3)
  • (C) arrayOf(1, 2, 3)
  • (D) list(1, 2, 3)
  • Correct Answer - Option(C)
  • Views: 21
  • Filed under category Kotlin
  • Hashtags:

Explanation by: Admin

arrayOf() is used to create an array in Kotlin.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.