I have implemented two interfaces with same method names and signatures in a single class then how the compiler will identify the which method is for which interface?
E.X:
public interface Hourly{
int calculate_salary();
}
public interface Fixed{
int calculate_salary();
}
public class Employee implements Hourly, Fixed{
public static void main(String... args) throws Exception{
}
@Override
int calculate_salary(){ // from which interface Hourly or Fixed???
return 0;
}
}
this problem has solution in C# but it did not work that way in java please help
thanks