美文网首页
关于Android throws IOException

关于Android throws IOException

作者: 学习不断 | 来源:发表于2017-11-29 09:43 被阅读35次

    throws IOException不是跟try catch一起用的当方法里一个语句产生了IOException如果你用的try catch那么这个异常是在这个方法中被捕获

    如果你用的throws IOException那么可以不写try catch语句

    这个异常被抛到方法外,在这个方法外被捕获

    相关文章

      网友评论

          本文标题:关于Android throws IOException

          本文链接:https://www.haomeiwen.com/subject/fexubxtx.html