Created
April 2, 2018 09:41
-
-
Save sajjadyousefnia/8831bb889e7713b176c3d47d7f790e4a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val mutableListFood: MutableList<String> = mutableListOf<String>("Rice & stew", "Jollof rice", "Eba & Egusi", "Fried rice") | |
mutableListFood.remove("Fried rice") | |
mutableListFood.removeAt(0) | |
mutableListFood.set(0, "Beans") | |
mutableListFood.add(1, "Bread & tea") | |
for (foodName in mutableListFood) { | |
println(foodName) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment