Method name collision in interface implementation - Java
Posted
by Bhaskar
on Stack Overflow
See other posts from Stack Overflow
or by Bhaskar
Published on 2010-04-08T06:35:31Z
Indexed on
2010/04/08
6:43 UTC
Read the original article
Hit count: 441
If I have two interfaces , both quite different in their purposes , but with same method signature , how do I make a class implement both without being forced to write a single method that serves for the both the interfaces and writing some convoluted logic in the method implementation that checks for which type of object the call is being made and invoke proper code ?
In C# , this is overcome by what is called as explicit interface implementation. Is there any equivalent way in Java ?
© Stack Overflow or respective owner