A

Admin • 833.24K Points
Coach

Q. Which of these is a correct way to create a set in Kotlin?

  • (A) createSet(1, 2, 3)
  • (B) setOf(1, 2, 3)
  • (C) Set(1, 2, 3)
  • (D) makeSet(1, 2, 3)
  • Correct Answer - Option(B)
  • Views: 20
  • Filed under category Kotlin
  • Hashtags:

Explanation by: Admin

Kotlin uses setOf() to create immutable sets.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.