关于一个异常处理的不能再简单的问题
public   class   trying 
 {                          
             public   int   output(int   c)   throws   NegativeNumberException 
             { 
                         return   c;   
             } 
 } 
 这段代码编译后显示: 
 1错误 
 trying.java:5:   找不到符号 
 符号:类NegativeNumberException 
 位置:类trying 
             public   int   output(int   c)   throws   NegativeNumberException 
 ^
------解决方案--------------------NegativeNumberException 并不是JAVA的标准异常类,你需要自己声明他。
------解决方案--------------------可以实现一个类NegativeNumberException extends Exception,然后在 
 public int output(int c) throws NegativeNumberException 
 { 
 if (c  < 0) throw NegativeNumberException(); 
 return c;   
 } 
 }
------解决方案--------------------可以自己定义一个异常,让类来继承它
------解决方案--------------------必须自己定义