Created
October 11, 2019 19:33
-
-
Save juliofalbo/da90e5dc12e8236cd40a2aef15954304 to your computer and use it in GitHub Desktop.
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 class FunctionalProgramming { | |
public static void main(String[] args) { | |
calc((a, b) -> a + b); | |
} | |
public static void calc(FunctionInterface functionInterface) { | |
Integer result = functionInterface.add(2, 2); | |
System.out.println(result); | |
} | |
} | |
interface FunctionInterface { | |
Integer add(int param1, int param2); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment