Created
February 2, 2020 15:01
-
-
Save magdamiu/7e4ba9f4ad5594a1fd48740931a6bb9f to your computer and use it in GitHub Desktop.
Nothing and Unit in Kotlin
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 reportError(): Nothing { | |
throw RuntimeException() | |
} | |
fun displayHelloMessage(): Unit { | |
println("Hello from Kotlin! :)") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment