mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-16 08:31:35 +00:00
15 lines
353 B
Plaintext
Vendored
15 lines
353 B
Plaintext
Vendored
class C {
|
|
fun doSomething() {
|
|
val text = "hello"
|
|
val it = getSomeObjects(text).iterator()
|
|
while (it.hasNext()) {
|
|
println("text = " + it.next())
|
|
}
|
|
}
|
|
|
|
private fun getSomeObjects(text: String): Collection<Any> {
|
|
val list = arrayListOf<Any>()
|
|
list.add(text)
|
|
return list
|
|
}
|
|
} |