42.
Which of the following listed view hierarchies is not valid?

43.
What is the correct way to create an ArrayList in Kotlin?

46.
What is the correct syntax to convert the String "42" to a Long in Kotlin?

49.
How can you retrieve the value of the property codeName without referring to it by name or destructuring?
data class Project(var codeName: String, var version: String)
fun main(){
  val proj = Project("Chilli Pepper", "2.1.0")
}

50.
You would like to print each score on its own line with its cardinal position. Without using var or val, which method allows iteration with both the value and its position?
fun main() {
  val highScores = listOf(4000, 2000, 10200, 12000, 9030)
}

Read More Section(Kotlin Program)

Each Section contains maximum 100 MCQs question on Kotlin Program. To get more questions visit other sections.