February 2014
Beginner
1248 pages
62h 25m
English
In Chapter 21, Custom Generic Data Structures, we provide an example of a custom exception class. We declare a reusable class called List that’s capable of storing a list of references to objects. Some operations typically performed on a List are not allowed if the List is empty, such as removing an item from the front or back of the list. For this reason, some List methods throw exceptions of exception class EmptyListException.
Good Programming Practice 11.3
By convention, all exception-class names should end with the word Exception.
Read now
Unlock full access