Object-Oriented Programming

dat1/inf1/sw3

Location

Niels Jernes Vej 10

Time

October 3, 10.15-12.00

Subject

An exception is when an unexpected situation occurs in a Java program. The program then raises an exception that must be handled (caught) somewhere else in the program. Exception handling is built-in to the Java language and cannot be ignored by the programmer as it can in other languages such as C++. This is a feature and one of the reasons many technicians state that the quality of Java programs are in general higher than programs written in a language such as C++. The built-in exception handling is also quoted as being one of the reasons that programmers are more productive, i.e., more lines of code per hour, than comparable languages such as C++ and Pascal.

Readings

"Thinking in Java" Chapter 9 ("Error Handling with Exceptions").

Exercise

Exercise

Slides

PDF

Links

Best regards,
Kristian Torp