-
-
Save mochadwi/847e71d6bf0228c7c5dc8b8f067c4534 to your computer and use it in GitHub Desktop.
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
val number = try { | |
"123".toInt() | |
} catch(e: NumberFormatException) { | |
-1 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment