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