import java.io.*;
interface Executor {
void execute() throws E;
}
public class GenericExceptionTest {
public static void main(String args[]) {
try {
Executor e =
new Executor() {
public void execute() throws IOException
{
// code here that may throw an
// IOException or a subtype of
// IOException
}
};
e.execute();
} catch(IOException ioe) {
System.out.println("IOException: " + ioe);
ioe.printStackTrace();
}
}
}