Java Lambda - LongBinaryOperator example

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


  1. LongBinaryOperator applyAsLong


The following example shows how to use LongBinaryOperator.

import java.util.function.LongBinaryOperator;

public class Main {

  public static void main(String[] args) {
    LongBinaryOperator i = (x,y) -> x/y;

The code above generates the following result.