File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ Servlet接口定义了5个方法,其中**前三个方法与Servlet生命周期
59
59
60
60
- ` void init(ServletConfig config) throws ServletException `
61
61
- ` void service(ServletRequest req, ServletResponse resp) throws ServletException, java.io.IOException `
62
- - ` void destory () `
62
+ - ` void destroy () `
63
63
- ` java.lang.String getServletInfo() `
64
64
- ` ServletConfig getServletConfig() `
65
65
Original file line number Diff line number Diff line change @@ -419,9 +419,10 @@ final关键字主要用在三个地方:变量、方法、类。
419
419
420
420
### 异常处理总结
421
421
422
- - **try 块:**用于捕获异常。其后可接零个或多个catch块,如果没有catch块,则必须跟一个finally块。
423
- - **catch 块:**用于处理try捕获到的异常。
424
- - **finally 块:**无论是否捕获或处理异常,finally块里的语句都会被执行。当在try块或catch块中遇到return语句时,finally语句块将在方法返回之前被执行。
422
+ - **try 块:** 用于捕获异常。其后可接零个或多个catch块,如果没有catch块,则必须跟一个finally块。
423
+ - **catch 块:** 用于处理try捕获到的异常。
424
+ - **finally 块:** 无论是否捕获或处理异常,finally块里的语句都会被执行。当在try块或catch块中遇到return
425
+ 语句时,finally语句块将在方法返回之前被执行。
425
426
426
427
**在以下4种特殊情况下,finally块不会被执行:**
427
428
You can’t perform that action at this time.
0 commit comments