What is the difference between final, finalize and finally?

Technology CommunityCategory: JavaWhat is the difference between final, finalize and finally?
VietMX Staff asked 4 years ago
  • final is a Java keyword used to indicate that either a method can not override in a subclass, or a class can not be extended or a field can not be modified.
  • finalize is a method that gets called on an instance of an Object when it is garbage collected.
  • finally is a Java keyword used in exception handling to indicate a block of code that should always be run whether an exception is thrown or not.