This shows that a class implementing an interface need not
import java.io.*;
/** This shows that a class implementing an interface need not
* declare all the Throws that are declared in the interface.
*/
publicclass InterfaceWithoutAllThrows {
interface bar {
publicvoid foo() throws IOException;
}
class baz implements bar {
publicvoid foo() {
System.out.println("This is foo-lish");
}
}
publicstaticvoid main(String[] argv) {
new InterfaceWithoutAllThrows().new baz().foo();
}
}