import java.io.IOException;
interface TestInterface
{
void test() throws IOException;
}
public class Second implements TestInterface
{
public void test() // DOES NOT THROW IOEXCEPTION
{
System.out.println("Second.test() invoked");
}
public static void main(String[] args) throws IOException
{
TestInterface j = new Second();
j.test();
}
}
C:\users\Babu\temp\java>javac Second.java
C:\users\Babu\temp\java>java Second
Second.test() invoked
No comments:
Post a Comment