365e Java - Exceptions
Home Accessibility Courses Diary The Mouth Forum Resources Site Map About Us Contact

Well House Consultants
You are on the site of Well House Consultants who provide Open Source Training Courses and business hotel accommodation. You are welcome to browse and use our resources subject to our copyright statement and to add in links from your pages to ours.
Other subject areas - resources
Java Resources
Well House Manor Resources
Perl Resources
Python Resources
PHP Resources
Object Orientation and General topics
MySQL Resources
Linux / LAMP / Tomcat Resources
Well House Consultants Resources
Extras Resources
C and C++ Resources
Ruby Resources
Tcl/Tk Resources
Web and Intranet Resources
Java module J712
Exceptions
Exercises, examples and other material relating to training module J712. This topic is presented on public courses Learning to Program in Java, Java Bootcamp, Java Programming for the Web

Your program is affected by the environment around it. Its performance will vary depending on aspects as diverse as user inputs and the availability (or lack) of a network service. Java provides you with exceptions, which are a mechanism through which you trap and handle behaviours that differ from the norm.

Related technical and longer articles
errors v exceptions

Articles and tips on this subjectupdated
3045After Course Resources - do we publish sample answers. Example from Java Exceptions module.
At the end of each module on our courses, there's an exercise for the delegates. It lets them make use of many of the elements they've learned about to consolidate their knowledge. And it helps me evaluate, as they work through the exercise, how they are progressing; I can "mop up" any major elements ...
2010-11-13
(longest)
3048String handling - from first steps to practical examples
Initial String handling examples on a training course are sometimes a bit mundane - and that's because we have to cover some of the basics like "what is a string" before we start reading them in useful quantities from files, databases, or web resources. But it's important to get those basics understood ...
2010-11-13
 
2862Fail Safe Error Handling in Java via Exceptions
"What could possibly go wrong?" ... The usual answer from a cynic is "anything, and usually at the most inconvenient time, and in the most unexpected way!". So checking for routine errors in your program code is a good start, but it doesn't go far enough; you need to be able to handle errors which are ...
2010-07-09
 
2622Handling unusual and error conditions - exceptions
"I can't answer that question in the way you expect" ... that's something that may be said to you occasionally - you ask someone what suit a playing card is that they're holding and they cannot tell you because it is a joker, or you ask what number is written on a piece of paper when the paper is blank. The ...
2010-02-03
 
2420Exceptions in Java - why and how
Although it's common practise to include a static main test program in a class, it's something that newcomers can have some difficulty following ... so we don't do it too early on the course - we keep classes and programs that use those classes (even if they are just test programs) each in their own ...
2009-09-25
 
1875What are exceptions - Python based answer
How do you check for run time errors in your program? You'll include tests with if statements in almost every program you write, to ensure that user entered data is reasonable / as you would expect ... but you will also need to do more that that. You'll need to check whether a system function has run ...
2008-11-08
 
1066Final, 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 ...
2007-02-05
 
234f
Examples from our training material
Bikini.java   Practical Exception Handling Example
E1.java   Class to which to add exception handling during practicals
E1a.java   Sample answer - handling exceptions on reading use input
Jane.java   Define your own exception class
Keira.java   try, catch, finally - full example
card_7.java   for neston demo - interface card
neston.java   First example of an exception
playing_card_7.java   class of playing_card, used in "neston"
suspect_card_7.java   class used within "neston" demonstration
wadswick.java   Sample program that will throw an exception, not catch it, and fail
Background information
This module is available under an Open Training Notes License for free download from http://www.training-notes.co.uk.
Topics covered in this module
"trying" and "catching".
"throwing".
"finally".
Defining your own exceptions.
Complete learning
If you are looking for a complete course and not just a information on a single subject, visit our Listing and schedule page.

Well House Consultants specialise in training courses in Java,Python, Perl, PHP, and MySQL. We run Private Courses throughout the UK (and beyond for longer courses), and Public Courses at our training centre in Melksham, Wiltshire, England. It's surprisingly cost effective to come on our public courses - even if you live in a different country or continent to us.

We have a technical library of over 700 books on the subjects on which we teach. These books are available for reference at our training centre. Also available is the Opentalk Forum for discussion of technical questions.


You can Add a comment or ranking to this page

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

PAGE: http://www.wellho.net/resources/J712.html • PAGE BUILT: Wed Mar 6 10:39:20 2013 • BUILD SYSTEM: wizard
0