如何在Java中创建自定义异常类型?
我想在Java中创建自定义异常,我该怎么做?
...
try{
...
String word=reader.readLine();
if(word.contains(" "))
/*create custom exception*/
}
catch(){
当我使用 创建自定义异常时,我收到错误throw new...
unreported exception...must be caught or declared to be thrown