Try expression in Kotlin
The Try can be also used as Try expression in Kotlin. The Try expression returns the last expression of try block or last expression of catch. The finally block working doesn’t get affected in Try expression. To understand Try expression is Kotlin please check out the following example program. Example Program without Exception: fun main(args: Array<String>){ val str = …