Created
September 3, 2014 05:18
-
-
Save xenoterracide/0205464271096e6c97a2 to your computer and use it in GitHub Desktop.
Java 8 functions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Logged { | |
public static void exec ( Function<String,Void> log ) { | |
log.apply("hello world"); | |
} | |
} | |
Logged.exec( s -> System.out.println(s) ); | |
Logged.exec( s -> log.info(s) ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment