How it works...

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

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
52.14.200.246