LongBinaryOperator applyAsLong example
Description
LongBinaryOperator applyAsLong applies this operator to the given operands.
Syntax
applyAsLong
has the following syntax.
long applyAsLong(long left, long right)
Example
The following example shows how to use applyAsLong
.
import java.util.function.LongBinaryOperator;
//from w ww . j a va 2 s. c o m
public class Main {
public static void main(String[] args) {
LongBinaryOperator i = (x,y) -> x/y;
System.out.println(i.applyAsLong(Long.MAX_VALUE,Long.MAX_VALUE));
}
}
The code above generates the following result.
Home »
Java Lambda »
java.util.function Reference »
Java Lambda »
java.util.function Reference »