Class Notes (1,100,000)
US (480,000)
UW-Madison (5,000)
Lecture 1

COMP SCI 200 Lecture 1: Comp Sci 200-Lecture 29- Exceptions pt 3Premium


Department
Computer Sciences
Course Code
COMP SCI 200
Professor
Paul Marker
Lecture
1

This preview shows page 1. to view the full 4 pages of the document.
Comp Sci 200-Lecture 29- Exceptions pt 3
Exceptions
Unchecked vs Checked
Unchecked exception
An exceptional condition that the application usually cannot
anticipate or recover from. These are:
Errors
Runtime exceptions
Checked exception
All other exceptions. A method must handle all checked
exceptions by either:
Using a try-catch block, or
Throwing the exception
Try-catch
try {
tryStmt1;
.
.
.
tryStmtN;
}
You're Reading a Preview

Unlock to view full version

Subscribers Only