public class ko
{
public static void main(String args[])
{
try
{
int x[]=new int[-9];
System.out.println("此行将无法运行!");
}
catch(NegativeArraySizeException e)
{
System.out.println("数组索引为负所产生的异常!!")
}
}
}
{
public static void main(String args[])
{
try
{
int x[]=new int[-9];
System.out.println("此行将无法运行!");
}
catch(NegativeArraySizeException e)
{
System.out.println("数组索引为负所产生的异常!!")
}
}
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货