+ 5
What is wrong?
interface MathOperation{ int operation(int a, int b); } class Dcoder { public static void main(String args[]) { MathOperation m=(int a,int b)->(a+b); int x=m(8,5); System.out.println("Hello, Dcoder!"+x); } }
2 Respuestas
0
class Dcoder should implement the interface in order to use its components. write class Dcoder implements MathOperation
+ 1
Yes, you need to implement the interface in Dcoder Class