Is it possible to do this using Predicate interface.
I have a client class that utilizes functions provided by a MathUtility class. Whatever the Mathmatical operation it
The answer is yes, that should be possible. The you defined is not known to have the method "sum", therefore the compiler complains. Try to define
public interace SumInterface { public int sum(int a, int b); }
(I haven't tried this code in IDE but this should do the trick)