- 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.
推薦閱讀
- iOS Game Programming Cookbook
- Kibana Essentials
- Vue.js 2 and Bootstrap 4 Web Development
- 程序員數學:用Python學透線性代數和微積分
- Amazon S3 Cookbook
- 區塊鏈技術與應用
- 智能手機APP UI設計與應用任務教程
- Java EE企業級應用開發教程(Spring+Spring MVC+MyBatis)
- Spring Boot實戰
- Troubleshooting Citrix XenApp?
- C陷阱與缺陷
- ASP.NET Web API Security Essentials
- 實戰Python網絡爬蟲
- Developing Java Applications with Spring and Spring Boot
- 3ds Max瘋狂設計學院