当前位置: 代码迷 >> 20872的解决方案
 
  • 这么使用方法有有关问题么

    这么使用方法有问题么?publicintdivision(inta,intb)throwsException { try { returna/b; } catch(ArithmeticExceptione) { e.printStackTrace(); thrownewException("cannotdividebyzero"); } } p...

    93
    热度
  • throws 与 try{ }catch{ },该如何处理

    throws与try{}catch{}为何抛出异常没有错,而用trycatch处理异常会报错staticintmethod()throwsException{ try{ int[]a=null; for(inti=0;i<a.length;i++){ System.out.println(i); } return0; }catch(Exceptione){ throwe; }}-...

    2198
    热度
上一页1下一页