Interview answers verified by specialists.

Find interview questions and answers on this website:


See right interview answers on 30 common job interview questions

How is final different from finally and finalize()?

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.

Do you know that?

Always sketch out your ideas first before designing on the computer. Next

Articles: