Java Lambda - IntBinaryOperator example

IntBinaryOperator represents an operation upon two int-valued operands and producing an int-valued result. This is the primitive type specialization of BinaryOperator for int.


  1. IntBinaryOperator applyAsInt


The following example shows how to use IntBinaryOperator.

import java.util.function.IntBinaryOperator;
/*  ww w .  j  av  a  2s .c o  m*/
public class Main {

  public static void main(String[] args) {
    IntBinaryOperator io = (x,y)->x +y;


The code above generates the following result.