|
|
Topic 1 Why treat arithmetic
and file not found exceptions differently?
In Java, FileNotFoundException is a subclass of Exception, which means that the program must catch that
exception and do something about it. However, ArithmeticException is a subclass of RuntimeException,
which means that the program need not handle it. It
could be argued that there is no reason for ArithmeticException to be treated any
differently from FileNotFoundExceptions.
What reasons might there be for
the Java developers imposing this distinction?
Do you think the decision was a sensible one?
Back to top

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