Multiple Inheritance with Base Class and Interface having same function with different return types?

What you're trying to do is possible in Java. As Ernest stated, an Enumeration is not a subclass of Enumeration, since Java genercis lacks the concept of variance .

String is a subclass of Object, but Enumeration is not a subclass of Enumeration. If it were, then I could cast an Enumeration to an Enumeration, then cast it to an Enumeration, all without a warning; but when I tried to use it as an Enumeration, I'd get ClassCastExceptions.

If you can change the definition of the interface, you can broaden it and get what you want. The return type would be Enumeration.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions