JDK7特性:try-with-resources与AutoCloseable接口(实践)

1.正常写法 代码: public class AutoCloseableDemo { public static void main(String[] args) { try (AutoCloseableObjecct app = new AutoCloseableObjecct()) { System.out.println("--try--"); } catch (Excep
相关文章
相关标签/搜索