List of usage examples for java.lang Integer sum
public static int sum(int a, int b)
From source file:Main.java
public static void main(String[] argv) { // Uses a lambda expression BiFunction<Integer, Integer, Integer> func1 = (x, y) -> Integer.sum(x, y); System.out.println(func1.apply(2, 3)); // Uses a method reference BiFunction<Integer, Integer, Integer> func2 = Integer::sum; System.out.println(func2.apply(2, 3)); }