Created
July 27, 2013 08:45
-
-
Save ankurpshah/6094277 to your computer and use it in GitHub Desktop.
Java 8 Lambda example
This file contains 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
public FunctionalHelloButtonApp() { | |
button.addActionListener( | |
#{ ActionEvent e -> System.out.println("Hello There: event received: "+e) } | |
); | |
} |
This file contains 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
package functions; | |
public interface Function2<A1, A2, R> { | |
R apply(A1 a1, A2 a2); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment