extend abstract class & implement interface, different return type methods
abstractclass X
{
publicabstract String method();
}
interface Y
{
publicvoid method();
}
class Zextends Ximplements Y
{
// Compiler error, If I don't implement both methods
// If I implement only one method, compiler error is thrown for not
// implementing another method
// If I implement both the methods,duplicate method error is thrown by
//compiler
}
The same problem can occur if both methods throw different checked exceptions,or if access modifiers are different..etc
I'm preparing for SCJP, So just had this weired thought. Please let me know
if there is a way to solve this.

