Personal tools
You are here: Home Classes Fall 2004 - Spring 2005 CS 150 4.18.05 April 18
Document Actions

April 18

by admin last modified 2005-05-11 13:34

Examples from April 18

Today we started with two more examples of exception catching:

TestMultipleExceptions.java and SimpleInput.java Here an exception is generated several levels deep in the runtime stack, and caught in main().

TestFinally.java and SimpleInput.java This shows a finally clause, which is executed even if the try or catch clauses execute return statements.

GoReadYourself.java and SimpleInput.java This shows a program that uses the SimpleInput class to read a text file line by line. The file that is read is actually GoReadYourself.java, so in some ways this program prints itself.

 

 

 

 

 

Powered by Plone CMS, the Open Source Content Management System

This site conforms to the following standards: