A
final method or variable is one that can't be overridden - you can define a method as final within a class to ensure that any extensions to the class don't replace it.
If you add a
finally block onto the end of a try / catch exception handler, you're defining a block of code that will be run if the try is entered, even if problems occur and your method returns from within a catch rather than continuing.
A
finalize method is your destructor method - code that's run to clean up objects that are no longer required. For example, objects which are memory cached would be flushed back to the disc in your finalize.
(written 2007-02-05)
Associated topics are indexed as below, or enter http://melksh.am/nnnn for individual articles
J712 - Java - Exceptions [1875] What are exceptions - Python based answer - (2008-11-08)
[2420] Exceptions in Java - why and how - (2009-09-24)
[2622] Handling unusual and error conditions - exceptions - (2010-02-03)
[2862] Fail Safe Error Handling in Java via Exceptions - (2010-07-09)
[3045] After Course Resources - do we publish sample answers. Example from Java Exceptions module. - (2010-11-13)
[3048] String handling - from first steps to practical examples - (2010-11-13)
[4350] Keyboard reader for Java programming newcomers - (2014-12-12)
[4396] Java Utility class - flexible replacement for array. Also cacheing in objects and multiple catch clauses example. - (2015-01-16)
J710 - Java - Extending Classes and More [656] Think about your design even if you don't use full UML - (2006-03-24)
[831] Comparison of Object Oriented Philosophy - Python, Java, C++, Perl - (2006-08-13)
[1217] What are factory and singleton classes? - (2007-06-04)
[1294] An example of Java Inheritance from scratch - (2007-08-00)
[1501] Java - using super to call a method in the parent class - (2008-01-10)
[1538] Teaching Object Oriented Java with Students and Ice Cream - (2008-02-12)
[1556] Java - a demonstration of inheritance on just one page - (2008-02-26)
[1819] Calling base class constructors - (2008-10-03)
[2185] Abstract Classes - Java - (2009-05-16)
[2434] Abstract classes, Interfaces, PHP and Java - (2009-10-03)
[2604] Tips for writing a test program (Ruby / Python / Java) - (2010-01-29)
[2860] What methods are available on this Java object? - (2010-07-08)
[3047] What is a universal superclass? Java / Perl / Python / Other OO languages - (2010-11-13)
[4334] Splitting out code into name blocks for clarity and reusability - (2014-11-30)
[4366] Changing what operators do on objects - a comparison across different programming languages - (2014-12-26)
[4394] Philosophy behind object design - and how I applied in to a Java example - (2015-01-14)
[4419] Java Inheritance example - group of classes - step by step - (2015-02-08)
[4422] Objects - from physical to virtual or abstract - Java - (2015-02-10)
G996 - Well House Consultants - Newsletter Scripts [1001] .pdf files - upload via PHP, store in MySQL, retrieve - (2006-12-19)
[1123] mysqldump and mysqlrestore - (2007-03-30)
[1321] Resetting session based tests in PHP - (2007-08-26)
[1387] Error logging to file not browser in PHP - (2007-10-11)
[1487] Efficient PHP applications - framework and example - (2007-12-28)
[1505] Script to present commonly used images - PHP - (2008-01-13)
[1601] Replacing the last comma with an and - (2008-04-04)
[1665] Factory method example - Perl - (2008-06-04)
[1743] First class functions in Lua lead to powerful OO facilities - (2008-08-07)
[1813] Ajax - going Asyncronous and what it means - (2008-09-28)
[1954] mod_rewrite for newcomers - (2008-12-20)
[2046] Finding variations on a surname - (2009-02-17)
[2145] Using the internet to remotely check for power failure at home (PHP) - (2009-04-29)
[2259] Grouping rows for a summary report - MySQL and PHP - (2009-06-27)
[2360] Error Handling in Lua with assert and pcall - (2009-08-13)
[2433] Controlling, supressing, enabling PHP error messages - (2009-10-02)
[2539] Changing Images - (2009-12-17)
[3179] Oops - I typed ci not vi, and have lost my file ... - (2011-02-21)
Some other Articles
Java Deployment course - lunch breakRail trouble forced me to buy hotells -l report, Linux / Unix - types and permssionsSerialization in Java - all layers required!Final, Finally and Finalize - three special words in JavaGraham Ellis - an IntroductionLight and shadows at BeachBradford-on-Avon - 150 years of passenger trainsJava sorting - comparable v comparatorTake vehicles off the road - put all the passengers into one