xxxxxxxxxx
// Java Program to demonstrate
// DoubleToIntFunction's applyAsInt() method
import java.util.function.DoubleToIntFunction;
public class Main {
public static void main(String args[])
{
// Create a DoubleToIntFunction
DoubleToIntFunction truncate = a -> (int)a;
// Apply the function using applyAsInt()
System.out.println(truncate.applyAsInt(10.6));
}
}