GC 공부하면서 Finalize에 대한 설명을 들었는데,
난 그게 뭔지 여태 몰랐던 거였음. 소름.
link : http://www.javatpoint.com/difference-between-final-finally-and-finalize
There are many differences between final, finally and finalize. A list of differences between final, finally and finalize are given below:
No. | final | finally | finalize |
---|---|---|---|
1) | Final is used to apply restrictions on class, method and variable. Final class can't be inherited, final method can't be overridden and final variable value can't be changed. | Finally is used to place important code, it will be executed whether exception is handled or not. | Finalize is used to perform clean up processing just before object is garbage collected. |
2) | Final is a keyword. | Finally is a block. | Finalize is a method. |
댓글 없음:
댓글 쓰기