How is final different from finally and finalize()? Ans. final is a modifier which can be applied to a class or a method or a variable. final class can't be inherited, final method can't be overridden and final variable can't be changed. finally is an exception handling code section which gets executed whether an exception is raised or not by the try block code segment. finalize() is a method of Object class which will be executed by the JVM just before garbage collecting object to give a final chance for resource releasing activity. - Study24x7
Social learning Network
12 Oct 2023 09:55 AM study24x7 study24x7

How is final different from finally and finalize()? Ans. final is a modifier which can be applied to a class or a method or a variable. final class can't be inherited, final method can't be overridden and final variable can't be changed. finally is an exception handling code se...

See more

study24x7
Write a comment
Related Questions
500+   more Questions to answer
Most Related Articles