ObjLongConsumer accept example
Description
ObjLongConsumer accept performs this operation on the given arguments.
Syntax
accept
has the following syntax.
void accept(T t, long value)
Example
The following example shows how to use accept
.
import java.util.function.ObjLongConsumer;
//from www .j a v a 2 s . c o m
public class Main {
public static void main(String[] args) {
ObjLongConsumer<String> i = (s,d)->System.out.println(s+d);
i.accept("java2s.com ",Long.MAX_VALUE);
}
}
The code above generates the following result.
Home »
Java Lambda »
java.util.function Reference »
Java Lambda »
java.util.function Reference »