Professional Documents
Culture Documents
mobile app development written assignment 2.
mobile app development written assignment 2.
Written Assignment 2
Elements can repeat any number of times within a list. List in Kotlin is immutable.
Example:
Kotlin
println(fruit)
In this example, we create a list of fruits and demonstrate how to access elements and iterate over
the list.
Sets:
Example:
Kotlin
Maps:
Example:
Kotlin
In this example, we create a map of fruit prices and retrieve the price of an apple using its key.
References
https://developer.android.com/studio/install