gpt4 book ai didi

java - 检查与未检查的异常统计

转载 作者:行者123 更新时间:2023-11-29 08:16:18 27 4
gpt4 key购买 nike

在厌倦了以争论的方式说服我的同行放弃检查异常之后,我正在寻找任何统计数据来说明有多少程序员更喜欢检查异常,有多少人不想使用它们。
网上有这样的调查/投票/统计吗?

最佳答案

如何将他们指向 Java 教程:

http://download.oracle.com/javase/tutorial/essential/exceptions/runtime.html

最后一行清楚地总结了关键点:

Here's the bottom line guideline: If a client can reasonably be expected to recover from an exception, make it a checked exception. If a client cannot do anything to recover from the exception, make it an unchecked exception.

关于java - 检查与未检查的异常统计,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4618437/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com