JUnit automatically catches exceptions. It considers uncaught exceptions to be errors, which means the above example has redundant code in it.

 
  • JUnit可以自动的捕捉异常,把没有截获的异常看作错误,所以,上面的代码有冗余代码。
今日热词
目录 附录 查词历史