If i have two interfaces in which method is same but diffirent exception.one class is implementing both the interfaces.do i need to implement both the method in that class?
In the above case Implementor will compile... But if it was throwing SQLException as the compiler (or IDE) will show an error stating that the exception thrown is not compatible with InterfaceB
A method declaration must not have a throws clause that conflicts with that of any method that it overrides. Otherwise, a compile-time error.
Overriding method must only throw an Exception that is more restrictive than overridden method.
Overriding method might decide not to thow any Exception.
Overriding method can throw RuntimeException & its subclasses.
~ Pratibha Malhotra<br /> <br />Sun Certified Java Programmer<br />SCEA 1.4 (In Progress)<br />~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />"Many of life's failures are people who did not realize how close they were to success when they gave up!!"