posted 13 years ago
Normally you wouldn't return from inside a catch block. They probably just did it here to keep this small demo program short and simple.
In a real program, if you catch an exception, you usually need to either actually handle it (such as retrying, or using a valid default value), or else rethrow it (usually wrapped in a more layer-appropriate exception. Otherwise, the caller doesn't know something went wrong. He thinks the method succeeded and everything is fine, so he goes on as if that's the case. We usually don't want that.