官术网_书友最值得收藏!

No checked exceptions

In Java, exception handling is tedious and controlled by strict rules. Whenever we are dealing with checked exceptions, we can either handle exceptions in try…catch blocks, or they can be declared to be thrown. In this case, the code is repeated. Kotlin doesn't have any checked exceptions. The Exception class is extended from the java.lang.Exception class of the JDK library via typealias. We don't have to declare or handle the exceptions, thereby reducing a lot of boilerplate code.

Kotlin also provides other benefits, as explained in the following subsections.

主站蜘蛛池模板: 南通市| 横峰县| 丹巴县| 西青区| 晋中市| 伊吾县| 于田县| 定陶县| 隆化县| 那坡县| 宾川县| 江阴市| 娄底市| 海南省| 栾城县| 大丰市| 巴彦淖尔市| 拉萨市| 金门县| 宜章县| 永春县| 武功县| 乌兰察布市| 临夏市| 龙州县| 益阳市| 曲水县| 北宁市| 同德县| 来安县| 恭城| 恩平市| 丽江市| 茌平县| 南昌县| 错那县| 兴义市| 全椒县| 祁门县| 株洲县| 武穴市|