I have two interfaces:
interface A {
public void pull(SomeclassA a, SomeclassB b);
}
interface B {
public void make(SomeClassM m, SomeclassN n);
}
In each interface I have a method with same number of parameters. Then I have a class with methods using both the above two interfaces, that is:
public class C {
public void test(B b) {
}
public void test(A a) {
}
}
I need to use the class with Java 8 lambda expression. How will Java recognize which interface is passed in to a method of this class?
public static void main(String[] args) {
C c = new C();
c.test(
(a , b ) ->{
}
);
}