Created
June 6, 2016 09:27
-
-
Save numa08/5acf1bea18e82f60ccdf563b6106e08d to your computer and use it in GitHub Desktop.
val_is_not_final.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun failedSuruyo() { | |
throw Exception("error") | |
} | |
fun main(args: Array<String>) { | |
val res : String | |
try { | |
res = "succedd" | |
failedSuruyo() | |
} catch (exp : Exception) { | |
res = "failed" | |
} | |
println(res) // failed | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment