Hi
Here's a piece of code:
class MultipleInterfaces
{
public static void main(
String args[])
{
Imp i = new Imp();
}
}
interface i1
{
void method();
}
interface i2
{
int method();
}
class Imp implements i1, i2 // 2 INTERFACES WITH METHODS THAT DIFFER ONLY BY RETURN TYPE
{
public void method()
{
System.out.println("Implementing i1");
return;
}
public int method()
{
System.out.println("Implementing i2");
return 1 ;
}
}
Here's my problem.
If I had 2 interfaces containing methods with the same name and parameter list but differing in their return types and a class that wanted to implement both of them, whether there was a way out to the problem.
Thanks
Shanti