CS 1713 Introduction to Programming II Spring 2012 Daily Answers
Class 14:
An exception is an object that defines an unusual or erroneous situation.
If a statment can cause a checked exception, that exception must be either caught or thrown. For an unchecked exception this is optional.
x = Integer.parseInt(s);
try { x = Integer.parseInt(s); } catch (Exception e) { x = -1; }