RuntimeException

Report a typo

Write code that throws RuntimeException. Do not print anything in the output of the program.

Write a program in Kotlin
fun main() {
try {
// write your code here, do not touch the lines above

// do not touch the lines below
} catch(e: RuntimeException) {
println("Well")
} catch (e: Exception) {
println("Wrong")
}
}
___

Create a free account to access the full topic