From 89d7ebe41c2174067e59bf473ad8391f76006ac8 Mon Sep 17 00:00:00 2001 From: TTL <1050636648@qq.com> Date: Mon, 4 Jan 2021 17:38:40 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=98=BE=E7=A4=BA=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit > 3.2.4 1. **适用范围(资源的定义):** 任何实现 `java.lang.AutoCloseable`或者 `java.io.Closeable` 的对象 --- docs/java/basis/Java基础知识.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/java/basis/Java基础知识.md b/docs/java/basis/Java基础知识.md index 0f67fc7c..48f4e765 100644 --- a/docs/java/basis/Java基础知识.md +++ b/docs/java/basis/Java基础知识.md @@ -1240,7 +1240,7 @@ public class Test { #### 3.2.4. 使用 `try-with-resources` 来代替`try-catch-finally` -1. **适用范围(资源的定义):** 任何实现 `java.lang.AutoCloseable`或者``java.io.Closeable` 的对象 +1. **适用范围(资源的定义):** 任何实现 `java.lang.AutoCloseable`或者 `java.io.Closeable` 的对象 2. **关闭资源和 final 的执行顺序:** 在 `try-with-resources` 语句中,任何 catch 或 finally 块在声明的资源关闭后运行 《Effecitve Java》中明确指出: