您的位置:寻梦网首页编程乐园Java天地Core JavaJava Lecture Notes

Introduction

Content

Apply

Reflect

Extend

previous.gif
 (3087 bytes)

next.gif
 (2959 bytes)


Apply Index

Apply Page # 8

Exercise 4 — File handling exceptions

File handling is traditionally an area where the program has to be able to deal with all sorts of errors and unexpected results (these are collectively called ‘exceptions’ by Java programmers) Assuming that a program is well written (and therefore will not fail because of a trivial error on the part of the programmer), what can go wrong while attempting to read to data from, or write data to, a file? Some of these errors may be the result of a mistake on the part of the user, but the program must deal with them nonetheless. Try to think of at least five possible exceptions.

Discussion/Suggestion solution to Exercise 4

Back to content

Back to top

basicline.gif (169 bytes)

RITSEC - Global Campus
Copyright ?1999 RITSEC- Middlesex University. All rights reserved.
webmaster@globalcampus.com.eg