LongSupplier getAsLong gets a result.
getAsLong
has the following syntax.
long getAsLong()
The following example shows how to use getAsLong
.
import java.util.function.LongSupplier; /*ww w.j a v a 2 s .c om*/ public class Main { public static void main(String[] args) { LongSupplier i = () -> Long.MAX_VALUE; System.out.println(i.getAsLong()); } }
The code above generates the following result.