@FunctionalInterface
interface AddNumbers{
public int addNumbers(int x, int y);
}
public class Java8AddNumbers {
public static void main(String[] args) {
AddNumbers addNumbers = (x, y) -> x+y;
int result = addNumbers.addNumbers(10, 30);
System.out.println(result);
}
}
interface AddNumbers{
public int addNumbers(int x, int y);
}
public class Java8AddNumbers {
public static void main(String[] args) {
AddNumbers addNumbers = (x, y) -> x+y;
int result = addNumbers.addNumbers(10, 30);
System.out.println(result);
}
}