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

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.

主站蜘蛛池模板: 县级市| 安阳县| 攀枝花市| 五常市| 延寿县| 贵德县| 离岛区| 永登县| 延川县| 红安县| 舒兰市| 米脂县| 罗平县| 宿迁市| 永仁县| 宁化县| 陇南市| 亳州市| 德令哈市| 堆龙德庆县| 陆河县| 中阳县| 金塔县| 精河县| 扎兰屯市| 白玉县| 社会| 金溪县| 宾阳县| 麻栗坡县| 武城县| 韶山市| 遂宁市| 安塞县| 彝良县| 邮箱| 沙雅县| 思南县| 深州市| 永丰县| 临西县|