
Interfaces and Multiple Inheritance
You have seen that Java supports only single inheritance: A class cannot
have more than one ancestor. Multiple inheritance in Java is based on
interfaces.
An interface is the skeleton of a class; it declares the methods that a class
must support but it does not provide the implementation. Implementation
of the methods must be provided in a class.
1. Many Java APIs are defined in terms of interfaces. Listing A.5 is one
of the interfaces defined by SAX.
Listing A.5: A SAX Interface
package org.xml.sax;
/**
* Receive notification of general document events.
* Most comments removed to simplify the listing.
*
* @author David ...