Java Reference
In-Depth Information
3 . What is wrong with this fragment?
4 . What happens if an exception is not caught?
5 . What is wrong with this fragment?
6 . Can an inner catch rethrow an exception to an outer catch ?
7 . The finally block is the last bit of code executed before your program ends. True or
False? Explain your answer.
8 . What type of exceptions must be explicitly declared in a throws clause of a method?
9 . What is wrong with this fragment?
10 . In question 3 of the Chapter 6 Self Test, you created a Stack class. Add custom ex-
ceptions to your class that report stack full and stack empty conditions.
11 . What are the three ways that an exception can be generated?
12 . What are the two direct subclasses of Throwable ?
Search WWH ::




Custom Search