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

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.

主站蜘蛛池模板: 嵊州市| 揭阳市| 华蓥市| 芦溪县| 七台河市| 灵丘县| 莎车县| 普洱| 乌兰浩特市| 莱州市| 灵璧县| 陈巴尔虎旗| 紫阳县| 梧州市| 航空| 井冈山市| 博客| 九江市| 渝北区| 土默特右旗| 云林县| 新巴尔虎左旗| 玉溪市| 兴安盟| 双流县| 尼勒克县| 阳新县| 贵定县| 巴彦淖尔市| 游戏| 喀喇沁旗| 辽阳市| 嘉善县| 广丰县| 内黄县| 监利县| 玉环县| 桐乡市| 临猗县| 新巴尔虎左旗| 赤峰市|