特牛网址导航

java try-with-resources打开资源文件_使用try开启文件流-CSDN博客

网友收藏
文章浏览阅读796次。原来的try catch finally处理方法public class test1 { public static void main(String[] args) { FileInputStream file = null; try { file = new FileInputStream(new File("demo.txt")); } catch(IOException e){ e.printStackTrace_使用try开启文件流