interface i1{
int test();
}
interface i2{
String test();
}
class Test implements i1,i2{
<Return type> test(){
//code here
}
}
If return type of implemented method is int, error says Return type is incompatible with i2.test()
If return type of implemented method is String, error says Return type is incompatible with i1.test()
How should I implement those two interfaces in my class Test
Any Help appreciable.
You can’t. They’re incompatible. Only the method name and arguments are considered in this case.
Your choices are: