Skip to content

Instantly share code, notes, and snippets.

@sajjadyousefnia
Created April 2, 2018 09:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sajjadyousefnia/8831bb889e7713b176c3d47d7f790e4a to your computer and use it in GitHub Desktop.
Save sajjadyousefnia/8831bb889e7713b176c3d47d7f790e4a to your computer and use it in GitHub Desktop.
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