Files
kotlin-fork/j2k/tests/testData/ast/tryWithResource/WithCatchAndFinally.kt
T

17 lines
392 B
Kotlin

import java.io.*
public class C {
fun foo() {
try {
FileInputStream("foo").use { stream ->
// reading something
val c = stream.read()
System.out.println(c)
}
} catch (e: IOException) {
System.out.println(e)
} finally {
System.out.println("Finally!")
}
}
}