How is final different from finally and finalize()?
Final | Finally() | Finalize() |
---|---|---|
This is technically a keyword. | This is technically a block. | This is technically a protected method. |
Its usage is applying restrictions on class, variable, and methods. | This is used for both exception handling, try and catch blocks. | This is only called by the garbage collector before an object is being removed. |
BY Best Interview Question ON 18 Nov 2020