Example of Functional Interface in Java