Java, Programming, Development.
representing a simple calculator function interface Calculator { int calculate(int a, int b); } public class Main { public static void main(String[] args) { // Using a lambda expression to define addition Calculator add = (a, b) -> a + b; // Using a lambda expression to define subtraction