ObjectiveMcq
Print Protected
This page is protected for print. Use the website to view the content.
Which of the following is a correct way to create a list in Kotlin?
Correct Answer: A — val myList = listOf("A", "B", "C")
In Kotlin, the listOf function is used to create an immutable list. For example, val myList = listOf("A", "B", "C") creates a list that cannot be modified.