Function and BiFunction are the functional interfaces introduced from java 8. Simples examples are as below.