Hi, If the type of the object is AnInterface,the method declaration in that interface has throws clause.Hence the compiler complains. If the type of the object is AnInterfaceImpl, the method declaration in that class doesn't have the throws clause.so the compiler doesn't complain. -vinu.
Joined: Mar 01, 2005
hi vinu i didn't get what u r telling..
here the methods r overridden.since the overridden methods are called based on the objcet type rather than the reference variable type. the overridding method didn't violate any contract for overridding. Then why it getting error..