gpt4 book ai didi

java - 快速、琐碎的 Java 问题 : Parenthesis around SQLException

转载 作者:行者123 更新时间:2023-11-29 07:23:20 25 4
gpt4 key购买 nike

  try {
...
} catch (SQLException sqle) {
String theError = (sqle).getSQLState();
...
}

sqle 用括号括起来有什么作用?有什么事吗?

只是好奇。

最佳答案

快速回复 - 没有。

更长的回复 - 它可能是内联 Actor 的残留物:

((SomeMoreSpecificException)sqle).get...

关于java - 快速、琐碎的 Java 问题 : Parenthesis around SQLException,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/415179/

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