BAEL-382 creating mutalbe and immutable list
This commit is contained in:
parent
7fdf20df6b
commit
faa3d322f8
|
@ -30,6 +30,7 @@ class ItemManager(val categoryId: String, val dbConnection: String) {
|
||||||
fun sum(a: Int, b: Int): Int {
|
fun sum(a: Int, b: Int): Int {
|
||||||
return a + b
|
return a + b
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fun main(args: Array<String>) {
|
fun main(args: Array<String>) {
|
||||||
|
@ -39,7 +40,6 @@ fun main(args: Array<String>) {
|
||||||
println(n)
|
println(n)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
for (i in 2..9 step 2) {
|
for (i in 2..9 step 2) {
|
||||||
println(i)
|
println(i)
|
||||||
}
|
}
|
||||||
|
@ -71,4 +71,9 @@ fun main(args: Array<String>) {
|
||||||
"Alice" -> println("Hi lady")
|
"Alice" -> println("Hi lady")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
val items = listOf(1, 2, 3, 4)
|
||||||
|
|
||||||
|
|
||||||
|
val rwList = mutableListOf(1, 2, 3)
|
||||||
|
rwList.add(5)
|
||||||
}
|
}
|
Loading…
Reference in New Issue