BAEL-382 creating mutalbe and immutable list

This commit is contained in:
Tomasz Lelek 2017-01-17 16:25:19 +01:00
parent 7fdf20df6b
commit faa3d322f8
1 changed files with 6 additions and 1 deletions

View File

@ -30,6 +30,7 @@ class ItemManager(val categoryId: String, val dbConnection: String) {
fun sum(a: Int, b: Int): Int {
return a + b
}
}
fun main(args: Array<String>) {
@ -39,7 +40,6 @@ fun main(args: Array<String>) {
println(n)
}
for (i in 2..9 step 2) {
println(i)
}
@ -71,4 +71,9 @@ fun main(args: Array<String>) {
"Alice" -> println("Hi lady")
}
val items = listOf(1, 2, 3, 4)
val rwList = mutableListOf(1, 2, 3)
rwList.add(5)
}