Week 12 Discussion

 

1. Choose two problems from 10.2 - 10.7.

10.2) What is a try block?

   A try block is a block of code between braces {}, that helps handle exceptions.  When an exception is handled within a try block, the program passes control to the appropriate handler to deal with the exception.  The catch blocks are the handlers in this case and will attempt to resolve the exception within the block of code following the try block.

 

10.5)  What is a runtime exception?

  A runtime exception is one that a program encounters when erroneous data is input or calculated.  Some examples are arithmetic errors, missing files, this includes misspelled file names, and format errors.  Runtime errors can either be thrown by the program using the throws command or caught using a try-catch block.

 

Send me email

Visit my website

 


 

Home | Photos | Favorite Links | Matt's Bio

UMUC | Feedback | Guest book | E-mail me

 

FaulknerWeb.com is designed and managed by Matt Faulkner

Domain Name service provided by Namesecure

Web Service by eDataRack
Copyright © 1998 - 2009 [FaulknerWeb.com]. All rights reserved.
Updated: June 16, 2009 09:35 .