Aryan PrajapatKnowledge Contributor
Do final, finally and finalize keywords have the same function?
Do final, finally and finalize keywords have the same function?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Questions | Answers | Discussions | Knowledge sharing | Communities & more.
No, final, finally and finalize keywords have different functionalities.
Final is used to restrict classes, variables, or methods, the final keyword.
Finally is used to execute the code written inside the block without handling any exceptions.
Finalize is used to call the function of the implementation of cleaning the garbage collection of an object.