public interface ExceptionInterface {
void exceptionedMethod()throws Exception;
}
public abstract class ExceptionAbstractClass implements ExceptionInterface{
public void exceptionedMethod() throws/* Exception,*/UnsupportedOperationException {
}
}
public class ExceptionClass extends ExceptionAbstractClass {
public void exceptionedMethod() throws Exception {
}
}
最后一个会报错。
PS:UnsupportedOperationException :
/**
* Thrown to indicate that the requested operation is not supported.<p>
*
* This class is a member of the
* <a href="{@docRoot}/../guide/collections/index.html">
* Java Collections Framework</a>.
*
* @author Josh Bloch
* @version 1.15, 01/23/03
* @since 1.2
*/