val s = person.name ?: return
loop@ for (i in 1..100) { // ... }
loop@ for (i in 1..100) { for (j in 1..100) { if (...) break@loop } }
fun foo() { ints.forEach { if (it == 0) return print(it) } }
fun foo() { ints.forEach { if (it == 0) return@forEach print(it) } }
fun foo() { ints.forEach(fun(value: Int) { if (value == 0) return print(value) }) }
Copyrights © - Joinc, All Rights Reserved. Inherited From - Yundream Rebranded By - Joonphil
Contents
반환과 점프
Break와 Continue Label
Return Label
Recent Posts
Archive Posts
Tags