Java Reference
In-Depth Information
FIGURE 10-8
FIGURE 10-9
The code for the PasswordUsedException class is very similar to the code
for the PasswordExpiredException class. In Figure 10-9, line 9 declares the
PasswordUsedException class; the keyword, extends, indicates that it extends the
PasswordException class. Lines 21 through 25 implement the abstract method,
usage(), and define a concatenated string message that is returned when the
usage() method of the PasswordUsedException exception is called.
The steps on the next page enter code for the PasswordExpiredException and
PasswordUsedException classes to extend the abstract class, PasswordException.
 
Search WWH ::




Custom Search