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
相關文章
相關標籤/搜索