No exception of type Exception can be thrown; an exception type
must be a subclass of Throwable
这句话是什么意思啊
还有下面一段代码,为什么没办法抛异常
class Demo
{
int div(int a,int b) throws Exception
{
return a/b;
}
}
class Exception
{
public static void main(String[] args) throws Exception
{
Demo d=new Demo();
int x=d.div(4,1);
System.out.println("x="+x);
System.out.println("over");
}
}
求助 |
|