try-with-resources使用示例 1try(InputStream is =newFileInputStream("test")) {2is.read();3...4}catch(Exception e) {5...6}finally{7//no need to add code to close InputStream, its close method will be internally called8//(无需添加关闭InputStream输入流的代码,其close()方法会自行调用)...