Home Accessibility Courses Twitter The Mouth Facebook Resources Site Map About Us Contact
 
For 2023 (and 2024 ...) - we are now fully retired from IT training.
We have made many, many friends over 25 years of teaching about Python, Tcl, Perl, PHP, Lua, Java, C and C++ - and MySQL, Linux and Solaris/SunOS too. Our training notes are now very much out of date, but due to upward compatability most of our examples remain operational and even relevant ad you are welcome to make us if them "as seen" and at your own risk.

Lisa and I (Graham) now live in what was our training centre in Melksham - happy to meet with former delegates here - but do check ahead before coming round. We are far from inactive - rather, enjoying the times that we are retired but still healthy enough in mind and body to be active!

I am also active in many other area and still look after a lot of web sites - you can find an index ((here))
Final, Finally and Finalize - three special words in Java

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)


Back to
Graham Ellis - an Introduction
Previous and next
or
Horse's mouth home
Forward to
Serialization in Java - all layers required!
Some other Articles
Java Deployment course - lunch break
Rail trouble forced me to buy hotel
ls -l report, Linux / Unix - types and permssions
Serialization in Java - all layers required!
Final, Finally and Finalize - three special words in Java
Graham Ellis - an Introduction
Light and shadows at Beach
Bradford-on-Avon - 150 years of passenger trains
Java sorting - comparable v comparator
Take vehicles off the road - put all the passengers into one
4759 posts, page by page
Link to page ... 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96 at 50 posts per page


This is a page archived from The Horse's Mouth at http://www.wellho.net/horse/ - the diary and writings of Graham Ellis. Every attempt was made to provide current information at the time the page was written, but things do move forward in our business - new software releases, price changes, new techniques. Please check back via our main site for current courses, prices, versions, etc - any mention of a price in "The Horse's Mouth" cannot be taken as an offer to supply at that price.

Link to Ezine home page (for reading).
Link to Blogging home page (to add comments).

You can Add a comment or ranking to this page

© WELL HOUSE CONSULTANTS LTD., 2024: 48 Spa Road • Melksham, Wiltshire • United Kingdom • SN12 7NY
PH: 01144 1225 708225 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho

PAGE: http://www.wellho.net/mouth/1066_Fin ... -Java.html • PAGE BUILT: Sun Oct 11 16:07:41 2020 • BUILD SYSTEM: JelliaJamb