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

16 lines
330 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)
}
}
}