filmov
tv
Final, finally and finalize || JAVA Interview Questions

Показать описание
Final: If any restriction is required for classes, variables, or methods, the final
keyword comes in handy. Inheritance of a final class and overriding of a final method is restricted by the use of the final keyword. The variable value becomes fixed after incorporating the final keyword.
Finally: It is the block present in a program where all the codes written inside it get executed irrespective of handling of exceptions.
Finalize: Prior to the garbage collection of an object, the finalize method is called so that the clean-up activity is implemented.
#javainterviewquestions
keyword comes in handy. Inheritance of a final class and overriding of a final method is restricted by the use of the final keyword. The variable value becomes fixed after incorporating the final keyword.
Finally: It is the block present in a program where all the codes written inside it get executed irrespective of handling of exceptions.
Finalize: Prior to the garbage collection of an object, the finalize method is called so that the clean-up activity is implemented.
#javainterviewquestions