gps single not found:关于异常!那里的问题?8个数循环了24次??

来源:百度文库 编辑:杭州交通信息网 时间:2024/04/27 17:24:11
class NotIdolNumberException extends Exception
{
NotIdolNumberException()
{
super("不是偶数");
}
}
class IsDivisorPerseException extends Exception
{
IsDivisorPerseException()
{
super("是除数本身");
}
}
class CustomException
{
public static void main(String args[])
{
int num1[]={4,8,15,32,64,127,256,512};
int num2[]={2,1,2,4,4,4,8};
for(int i=0;i<num1.length;i++)
{
for(int j=0;j<num2.length;j++)
{
try
{
if((num1[i]/num2[j])%2!=0)
throw new NotIdolNumberException();
if(num1[i]/num2[j]==num1[i])
throw new IsDivisorPerseException();
}
catch(NotIdolNumberException e)
{
System.out.println(e);
}
catch(IsDivisorPerseException e)
{
System.out.println(e);
}
}
}
}
}

..应该会循环56次吧。。假如没有抛出exeception的话。。

抛了什么exeception呢?