exceptions and extending classes
Hello.
I just came across some code that I expected would not compile, but it does. I have an interface that defines a method such as:
public String getString() throws Exception;
When i implement this in a class, it seems that i can omit the throws exception from my impleementation's method signature, such as:
public String getString() {
return "bob";
}
I fully understand that you can't throw an exception if there's no chance to create one, as in my simple method logic. But, if you don't have to have the throws statement in your implementation's signature, what does its presence in the interface imply?
Message was edited by:
chadmichael

