当前位置:首页 > Java > 正文内容

40.请写出程序的运行结果。 public class Exec { public static void main(Stri

2023-12-01Java

40.请写出程序的运行结果。 public class Exec { public static void main(String args[]) { try { int x[] = new int[-1]; int j = 0 / 0; } catch (NegativeArraySizeException e) { System.out.println("NegativeArraySizeException"); } catch (ArithmeticException e) { System.out.println("ArithmeticException"); } finally { System.out.println("End!"); } System.exit(0); } } NegativeArraySizeException End!

在修改试题中阅读

扫描二维码免费使用微信小程序搜题/刷题/查看解析。

版权声明:本文由翰林刷题小程序授权发布,如需转载请注明出处。

本文链接:https://20230611.cn/post/8440583.html