- Kotlin for Enterprise Applications using Java EE
- Raghavendra Rao K
- 100字
- 2021-06-10 18:49:25
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.
推薦閱讀
- 深度實(shí)踐OpenStack:基于Python的OpenStack組件開發(fā)
- Learn TypeScript 3 by Building Web Applications
- 前端跨界開發(fā)指南:JavaScript工具庫(kù)原理解析與實(shí)戰(zhàn)
- JMeter 性能測(cè)試實(shí)戰(zhàn)(第2版)
- C語(yǔ)言程序設(shè)計(jì)教程(第2版)
- Python Deep Learning
- Mastering LibGDX Game Development
- WordPress Plugin Development Cookbook(Second Edition)
- Mastering Python Networking
- PHP+Ajax+jQuery網(wǎng)站開發(fā)項(xiàng)目式教程
- Laravel Application Development Blueprints
- Java并發(fā)編程:核心方法與框架
- Learning Ionic(Second Edition)
- Scala編程(第4版)
- Instant AppFog