July 2018
Intermediate to advanced
242 pages
8h 6m
English
That's it. The try…catch declaration in Kotlin can be assigned to a variable. The reason is that it is, in fact, an expression! In our example, try…catch returns the result of the parseInt() function, and when the function throws an exception, it returns 0.
Read now
Unlock full access