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

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.

主站蜘蛛池模板: 简阳市| 方城县| 翼城县| 阿巴嘎旗| 密云县| 武隆县| 海林市| 新密市| 遂溪县| 博湖县| 河东区| 根河市| 江陵县| 枞阳县| 陇南市| 广平县| 兴和县| 安徽省| 社旗县| 临夏市| 泌阳县| 信阳市| 永胜县| 栾城县| 玉龙| 手机| 那曲县| 永胜县| 济南市| 丁青县| 张家界市| 临沭县| 伊吾县| 景德镇市| 山阴县| 神木县| 淳化县| 巴东县| 阿荣旗| 清新县| 沿河|