posted 6 years ago
If I define a functional interface in my class like
Then inside this class, when I do (int a, int b) -> a +b; it knows it should match "MathOperation" interface since that's the only one that matches. However, if the above interface code is NOT in the same class as (int a, int b) -> a +b;
how does it know which one should be ? For example , if I define some interfaces like
Then in my code